stb_c_lexer_init:
  299|  2.38k|{
  300|  2.38k|   lexer->input_stream = (char *) input_stream;
  301|  2.38k|   lexer->eof = (char *) input_stream_end;
  302|  2.38k|   lexer->parse_point = (char *) input_stream;
  303|  2.38k|   lexer->string_storage = string_store;
  304|  2.38k|   lexer->string_storage_len = store_length;
  305|  2.38k|}
stb_c_lexer_get_token:
  600|   125k|{
  601|   125k|   char *p = lexer->parse_point;
  602|   125k|   char *eof = lexer->eof;
  603|       |
  604|       |   #ifdef STB__CLEX_use_stdlib
  605|       |   if (eof != NULL)
  606|       |      return stb__clex_token(lexer, CLEX_parse_error, p,p);
  607|       |   #endif
  608|       |
  609|       |   // skip whitespace and comments
  610|   129k|   for (;;) {
  611|       |      #ifdef STB_C_LEX_ISWHITE
  612|       |      while (p != eof) {
  613|       |         int n;
  614|       |         n = STB_C_LEX_ISWHITE(p);
  615|       |         if (n == 0) break;
  616|       |         if (eof && eof - lexer->parse_point < n)
  617|       |            return stb__clex_token(lexer, CLEX_parse_error, p,eof-1);
  618|       |         p += n;
  619|       |      }
  620|       |      #else
  621|   191k|      while (p != eof && stb__clex_iswhite(*p))
  ------------------
  |  Branch (621:14): [True: 189k, False: 1.81k]
  |  Branch (621:26): [True: 62.1k, False: 127k]
  ------------------
  622|  62.1k|         ++p;
  623|   129k|      #endif
  624|       |
  625|   129k|      STB_C_LEX_CPP_COMMENTS(
  ------------------
  |  |   11|   129k|#define STB_C_LEX_CPP_COMMENTS      Y
  |  |  ------------------
  |  |  |  |  293|  1.20M|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 127k, False: 1.81k]
  |  |  |  |  |  Branch (293:14): [True: 3.57k, False: 123k]
  |  |  |  |  |  Branch (293:14): [True: 3.55k, False: 21]
  |  |  |  |  |  Branch (293:14): [True: 1.24k, False: 2.30k]
  |  |  |  |  |  Branch (293:14): [True: 53.7k, False: 25]
  |  |  |  |  |  Branch (293:14): [True: 53.4k, False: 273]
  |  |  |  |  |  Branch (293:14): [True: 53.2k, False: 227]
  |  |  |  |  |  Branch (293:14): [True: 52.5k, False: 723]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  626|   129k|         if (p != eof && p[0] == '/' && p+1 != eof && p[1] == '/') {
  627|   129k|            while (p != eof && *p != 0 && *p != '\r' && *p != '\n')
  628|   129k|               ++p;
  629|   129k|            continue;
  630|   129k|         }
  631|   129k|      )
  632|       |
  633|   127k|      STB_C_LEX_C_COMMENTS(
  ------------------
  |  |   10|   127k|#define STB_C_LEX_C_COMMENTS        Y
  |  |  ------------------
  |  |  |  |  293|  1.08M|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 126k, False: 1.81k]
  |  |  |  |  |  Branch (293:14): [True: 2.32k, False: 123k]
  |  |  |  |  |  Branch (293:14): [True: 2.30k, False: 21]
  |  |  |  |  |  Branch (293:14): [True: 710, False: 1.59k]
  |  |  |  |  |  Branch (293:14): [True: 61.0k, False: 914]
  |  |  |  |  |  Branch (293:14): [True: 249, False: 665]
  |  |  |  |  |  Branch (293:14): [True: 61.9k, False: 45]
  |  |  |  |  |  Branch (293:14): [True: 38, False: 672]
  |  |  |  |  |  Branch (293:14): [True: 0, False: 0]
  |  |  |  |  |  Branch (293:14): [True: 0, False: 0]
  |  |  |  |  |  Branch (293:14): [True: 0, False: 0]
  |  |  |  |  |  Branch (293:14): [True: 710, False: 0]
  |  |  |  |  |  Branch (293:14): [True: 45, False: 665]
  |  |  |  |  |  Branch (293:14): [True: 0, False: 665]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  634|   127k|         if (p != eof && p[0] == '/' && p+1 != eof && p[1] == '*') {
  635|   127k|            char *start = p;
  636|   127k|            p += 2;
  637|   127k|            if (eof) {
  638|   127k|               while (p+1 < eof && (p[0] != '*' || p[1] != '/'))
  639|   127k|                  ++p;
  640|       |               // either p+1 == eof, p[0] == '*', or p[1] == '/'
  641|   127k|               if (p+1 == eof) ++p;
  642|   127k|            } else {
  643|   127k|               while (p[0] && (p[0] != '*' || p[1] != '/'))
  644|   127k|                  ++p;
  645|   127k|            }
  646|   127k|            if (p == eof || *p == 0)
  647|   127k|               return stb__clex_token(lexer, CLEX_parse_error, start, p-1);
  648|   127k|            p += 2;
  649|   127k|            continue;
  650|   127k|         }
  651|   127k|      )
  652|       |
  653|   127k|      #ifdef STB__clex_discard_preprocessor
  654|       |         // @TODO this discards everything after a '#', regardless
  655|       |         // of where in the line the # is, rather than requiring it
  656|       |         // be at the start. (because this parser doesn't otherwise
  657|       |         // check for line breaks!)
  658|   127k|         if (p != eof && p[0] == '#') {
  ------------------
  |  Branch (658:14): [True: 125k, False: 1.81k]
  |  Branch (658:26): [True: 1.30k, False: 124k]
  ------------------
  659|  40.1k|            while (p != eof && *p != 0 && *p != '\r' && *p != '\n')
  ------------------
  |  Branch (659:20): [True: 40.0k, False: 29]
  |  Branch (659:32): [True: 39.8k, False: 240]
  |  Branch (659:43): [True: 39.4k, False: 351]
  |  Branch (659:57): [True: 38.8k, False: 682]
  ------------------
  660|  38.8k|               ++p;
  661|  1.30k|            continue;
  662|  1.30k|         }
  663|   125k|      #endif
  664|       |
  665|   125k|      break;
  666|   127k|   }
  667|       |
  668|   125k|   if (p == eof)
  ------------------
  |  Branch (668:8): [True: 1.81k, False: 124k]
  ------------------
  669|  1.81k|      return stb__clex_eof(lexer);
  670|       |
  671|   124k|   switch (*p) {
  672|  87.8k|      default:
  ------------------
  |  Branch (672:7): [True: 87.8k, False: 36.1k]
  ------------------
  673|  87.8k|         #ifdef STB__clex_identifiers
  674|  87.8k|         if (   (*p >= 'a' && *p <= 'z')
  ------------------
  |  Branch (674:18): [True: 44.4k, False: 43.4k]
  |  Branch (674:31): [True: 20.3k, False: 24.1k]
  ------------------
  675|  67.5k|             || (*p >= 'A' && *p <= 'Z')
  ------------------
  |  Branch (675:18): [True: 30.7k, False: 36.8k]
  |  Branch (675:31): [True: 1.81k, False: 28.9k]
  ------------------
  676|  65.7k|             || *p == '_' || (unsigned char) *p >= 128    // >= 128 is UTF8 char
  ------------------
  |  Branch (676:17): [True: 417, False: 65.3k]
  |  Branch (676:30): [True: 1.51k, False: 63.8k]
  ------------------
  677|  63.8k|             STB_C_LEX_DOLLAR_IDENTIFIER( || *p == '$' ) )
  ------------------
  |  |   32|  63.8k|#define STB_C_LEX_DOLLAR_IDENTIFIER    Y
  |  |  ------------------
  |  |  |  |  293|  63.8k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 229, False: 63.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  678|  24.2k|         {
  679|  24.2k|            int n = 0;
  680|  24.2k|            lexer->string = lexer->string_storage;
  681|   415k|            do {
  682|   415k|               if (n+1 >= lexer->string_storage_len)
  ------------------
  |  Branch (682:20): [True: 2, False: 415k]
  ------------------
  683|      2|                  return stb__clex_token(lexer, CLEX_parse_error, p, p+n);
  684|   415k|               lexer->string[n] = p[n];
  685|   415k|               ++n;
  686|   415k|            } while (
  687|   415k|               p+n != eof && (
  ------------------
  |  Branch (687:16): [True: 415k, False: 251]
  ------------------
  688|   415k|                  (p[n] >= 'a' && p[n] <= 'z')
  ------------------
  |  Branch (688:20): [True: 349k, False: 65.7k]
  |  Branch (688:35): [True: 348k, False: 827]
  ------------------
  689|  66.5k|               || (p[n] >= 'A' && p[n] <= 'Z')
  ------------------
  |  Branch (689:20): [True: 19.2k, False: 47.3k]
  |  Branch (689:35): [True: 10.8k, False: 8.33k]
  ------------------
  690|  55.6k|               || (p[n] >= '0' && p[n] <= '9') // allow digits in middle of identifier
  ------------------
  |  Branch (690:20): [True: 14.5k, False: 41.1k]
  |  Branch (690:35): [True: 4.37k, False: 10.1k]
  ------------------
  691|  51.2k|               || p[n] == '_' || (unsigned char) p[n] >= 128
  ------------------
  |  Branch (691:19): [True: 4.41k, False: 46.8k]
  |  Branch (691:34): [True: 22.6k, False: 24.2k]
  ------------------
  692|  24.2k|                STB_C_LEX_DOLLAR_IDENTIFIER( || p[n] == '$' )
  ------------------
  |  |   32|  24.2k|#define STB_C_LEX_DOLLAR_IDENTIFIER    Y
  |  |  ------------------
  |  |  |  |  293|   439k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 222, False: 24.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  693|   415k|            ));
  694|  24.2k|            lexer->string[n] = 0;
  695|  24.2k|            lexer->string_len = n;
  696|  24.2k|            return stb__clex_token(lexer, CLEX_id, p, p+n-1);
  697|  24.2k|         }
  698|  63.6k|         #endif // STB__clex_identifiers
  699|       |
  700|       |         // check for EOF
  701|  63.6k|         STB_C_LEX_0_IS_EOF(
  702|  63.6k|            if (*p == 0)
  703|  63.6k|               return stb__clex_eof(lexer);
  704|  63.6k|         )
  705|       |
  706|  75.9k|      single_char:
  707|       |         // not an identifier, return the character as itself
  708|  75.9k|         if (*p == '}')
  ------------------
  |  Branch (708:14): [True: 1.04k, False: 74.8k]
  ------------------
  709|  1.04k|            p = p;
  710|  75.9k|         return stb__clex_token(lexer, *p, p, p);
  711|       |
  712|  1.19k|      case '+':
  ------------------
  |  Branch (712:7): [True: 1.19k, False: 122k]
  ------------------
  713|  1.19k|         if (p+1 != eof) {
  ------------------
  |  Branch (713:14): [True: 1.17k, False: 11]
  ------------------
  714|  1.17k|            STB_C_LEX_C_INCREMENTS(if (p[1] == '+') return stb__clex_token(lexer, CLEX_plusplus, p,p+1);)
  ------------------
  |  |   15|  1.17k|#define STB_C_LEX_C_INCREMENTS      Y
  |  |  ------------------
  |  |  |  |  293|  2.61k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 260, False: 919]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  715|    919|            STB_C_LEX_C_ARITHEQ(   if (p[1] == '=') return stb__clex_token(lexer, CLEX_pluseq  , p,p+1);)
  ------------------
  |  |   19|    919|#define STB_C_LEX_C_ARITHEQ         Y
  |  |  ------------------
  |  |  |  |  293|  2.20k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 364, False: 555]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  716|    919|         }
  717|    566|         goto single_char;
  718|  2.16k|      case '-':
  ------------------
  |  Branch (718:7): [True: 2.16k, False: 121k]
  ------------------
  719|  2.16k|         if (p+1 != eof) {
  ------------------
  |  Branch (719:14): [True: 2.15k, False: 12]
  ------------------
  720|  2.15k|            STB_C_LEX_C_INCREMENTS(if (p[1] == '-') return stb__clex_token(lexer, CLEX_minusminus, p,p+1);)
  ------------------
  |  |   15|  2.15k|#define STB_C_LEX_C_INCREMENTS      Y
  |  |  ------------------
  |  |  |  |  293|  4.53k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 236, False: 1.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  721|  1.91k|            STB_C_LEX_C_ARITHEQ(   if (p[1] == '=') return stb__clex_token(lexer, CLEX_minuseq   , p,p+1);)
  ------------------
  |  |   19|  1.91k|#define STB_C_LEX_C_ARITHEQ         Y
  |  |  ------------------
  |  |  |  |  293|  4.03k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 205, False: 1.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  722|  1.71k|            STB_C_LEX_C_ARROW(     if (p[1] == '>') return stb__clex_token(lexer, CLEX_arrow     , p,p+1);)
  ------------------
  |  |   16|  1.71k|#define STB_C_LEX_C_ARROW           Y
  |  |  ------------------
  |  |  |  |  293|  4.02k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 603, False: 1.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  723|  1.71k|         }
  724|  1.11k|         goto single_char;
  725|  1.26k|      case '&':
  ------------------
  |  Branch (725:7): [True: 1.26k, False: 122k]
  ------------------
  726|  1.26k|         if (p+1 != eof) {
  ------------------
  |  Branch (726:14): [True: 1.25k, False: 7]
  ------------------
  727|  1.25k|            STB_C_LEX_C_LOGICAL(  if (p[1] == '&') return stb__clex_token(lexer, CLEX_andand, p,p+1);)
  ------------------
  |  |   13|  1.25k|#define STB_C_LEX_C_LOGICAL         Y
  |  |  ------------------
  |  |  |  |  293|  2.80k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 292, False: 965]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  728|    965|            STB_C_LEX_C_BITWISEEQ(if (p[1] == '=') return stb__clex_token(lexer, CLEX_andeq , p,p+1);)
  ------------------
  |  |   18|    965|#define STB_C_LEX_C_BITWISEEQ       Y
  |  |  ------------------
  |  |  |  |  293|  2.14k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 214, False: 751]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  729|    965|         }
  730|    758|         goto single_char;
  731|  2.50k|      case '|':
  ------------------
  |  Branch (731:7): [True: 2.50k, False: 121k]
  ------------------
  732|  2.50k|         if (p+1 != eof) {
  ------------------
  |  Branch (732:14): [True: 2.47k, False: 30]
  ------------------
  733|  2.47k|            STB_C_LEX_C_LOGICAL(  if (p[1] == '|') return stb__clex_token(lexer, CLEX_oror, p,p+1);)
  ------------------
  |  |   13|  2.47k|#define STB_C_LEX_C_LOGICAL         Y
  |  |  ------------------
  |  |  |  |  293|  5.45k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 514, False: 1.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  734|  1.95k|            STB_C_LEX_C_BITWISEEQ(if (p[1] == '=') return stb__clex_token(lexer, CLEX_oreq, p,p+1);)
  ------------------
  |  |   18|  1.95k|#define STB_C_LEX_C_BITWISEEQ       Y
  |  |  ------------------
  |  |  |  |  293|  4.54k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 632, False: 1.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  735|  1.95k|         }
  736|  1.35k|         goto single_char;
  737|  3.29k|      case '=':
  ------------------
  |  Branch (737:7): [True: 3.29k, False: 120k]
  ------------------
  738|  3.29k|         if (p+1 != eof) {
  ------------------
  |  Branch (738:14): [True: 3.29k, False: 3]
  ------------------
  739|  3.29k|            STB_C_LEX_C_COMPARISONS(if (p[1] == '=') return stb__clex_token(lexer, CLEX_eq, p,p+1);)
  ------------------
  |  |   12|  3.29k|#define STB_C_LEX_C_COMPARISONS     Y
  |  |  ------------------
  |  |  |  |  293|  7.27k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 691, False: 2.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  740|  2.60k|            STB_C_LEX_EQUAL_ARROW(  if (p[1] == '>') return stb__clex_token(lexer, CLEX_eqarrow, p,p+1);)
  ------------------
  |  |   17|  2.60k|#define STB_C_LEX_EQUAL_ARROW       Y
  |  |  ------------------
  |  |  |  |  293|  5.42k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 227, False: 2.37k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  741|  2.60k|         }
  742|  2.37k|         goto single_char;
  743|  2.37k|      case '!':
  ------------------
  |  Branch (743:7): [True: 719, False: 123k]
  ------------------
  744|    719|         STB_C_LEX_C_COMPARISONS(if (p+1 != eof && p[1] == '=') return stb__clex_token(lexer, CLEX_noteq, p,p+1);)
  ------------------
  |  |   12|    719|#define STB_C_LEX_C_COMPARISONS     Y
  |  |  ------------------
  |  |  |  |  293|  3.13k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 710, False: 9]
  |  |  |  |  |  Branch (293:14): [True: 264, False: 446]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  745|    455|         goto single_char;
  746|    600|      case '^':
  ------------------
  |  Branch (746:7): [True: 600, False: 123k]
  ------------------
  747|    600|         STB_C_LEX_C_BITWISEEQ(if (p+1 != eof && p[1] == '=') return stb__clex_token(lexer, CLEX_xoreq, p,p+1));
  ------------------
  |  |   18|    600|#define STB_C_LEX_C_BITWISEEQ       Y
  |  |  ------------------
  |  |  |  |  293|  2.65k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 593, False: 7]
  |  |  |  |  |  Branch (293:14): [True: 259, False: 334]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  748|    341|         goto single_char;
  749|    820|      case '%':
  ------------------
  |  Branch (749:7): [True: 820, False: 123k]
  ------------------
  750|    820|         STB_C_LEX_C_ARITHEQ(if (p+1 != eof && p[1] == '=') return stb__clex_token(lexer, CLEX_modeq, p,p+1));
  ------------------
  |  |   19|    820|#define STB_C_LEX_C_ARITHEQ         Y
  |  |  ------------------
  |  |  |  |  293|  3.48k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 808, False: 12]
  |  |  |  |  |  Branch (293:14): [True: 218, False: 590]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  751|    602|         goto single_char;
  752|  2.51k|      case '*':
  ------------------
  |  Branch (752:7): [True: 2.51k, False: 121k]
  ------------------
  753|  2.51k|         STB_C_LEX_C_ARITHEQ(if (p+1 != eof && p[1] == '=') return stb__clex_token(lexer, CLEX_muleq, p,p+1));
  ------------------
  |  |   19|  2.51k|#define STB_C_LEX_C_ARITHEQ         Y
  |  |  ------------------
  |  |  |  |  293|  10.4k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 2.50k, False: 10]
  |  |  |  |  |  Branch (293:14): [True: 373, False: 2.13k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  754|  2.14k|         goto single_char;
  755|  2.14k|      case '/':
  ------------------
  |  Branch (755:7): [True: 1.61k, False: 122k]
  ------------------
  756|  1.61k|         STB_C_LEX_C_ARITHEQ(if (p+1 != eof && p[1] == '=') return stb__clex_token(lexer, CLEX_diveq, p,p+1));
  ------------------
  |  |   19|  1.61k|#define STB_C_LEX_C_ARITHEQ         Y
  |  |  ------------------
  |  |  |  |  293|  6.65k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 1.59k, False: 21]
  |  |  |  |  |  Branch (293:14): [True: 219, False: 1.37k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  757|  1.39k|         goto single_char;
  758|  1.99k|      case '<':
  ------------------
  |  Branch (758:7): [True: 1.99k, False: 122k]
  ------------------
  759|  1.99k|         if (p+1 != eof) {
  ------------------
  |  Branch (759:14): [True: 1.98k, False: 18]
  ------------------
  760|  1.98k|            STB_C_LEX_C_COMPARISONS(if (p[1] == '=') return stb__clex_token(lexer, CLEX_lesseq, p,p+1);)
  ------------------
  |  |   12|  1.98k|#define STB_C_LEX_C_COMPARISONS     Y
  |  |  ------------------
  |  |  |  |  293|  4.64k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 682, False: 1.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  761|  1.29k|            STB_C_LEX_C_SHIFTS(     if (p[1] == '<') {
  ------------------
  |  |   14|  1.29k|#define STB_C_LEX_C_SHIFTS          Y
  |  |  ------------------
  |  |  |  |  293|  5.98k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 676, False: 1]
  |  |  |  |  |  Branch (293:14): [True: 198, False: 478]
  |  |  |  |  |  Branch (293:14): [True: 677, False: 621]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  762|  1.29k|                                       STB_C_LEX_C_ARITHEQ(if (p+2 != eof && p[2] == '=')
  763|  1.29k|                                                              return stb__clex_token(lexer, CLEX_shleq, p,p+2);)
  764|  1.29k|                                       return stb__clex_token(lexer, CLEX_shl, p,p+1);
  765|  1.29k|                                    }
  766|  1.29k|                              )
  767|  1.29k|         }
  768|    639|         goto single_char;
  769|  1.23k|      case '>':
  ------------------
  |  Branch (769:7): [True: 1.23k, False: 122k]
  ------------------
  770|  1.23k|         if (p+1 != eof) {
  ------------------
  |  Branch (770:14): [True: 1.22k, False: 8]
  ------------------
  771|  1.22k|            STB_C_LEX_C_COMPARISONS(if (p[1] == '=') return stb__clex_token(lexer, CLEX_greatereq, p,p+1);)
  ------------------
  |  |   12|  1.22k|#define STB_C_LEX_C_COMPARISONS     Y
  |  |  ------------------
  |  |  |  |  293|  2.71k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 264, False: 963]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  772|    963|            STB_C_LEX_C_SHIFTS(     if (p[1] == '>') {
  ------------------
  |  |   14|    963|#define STB_C_LEX_C_SHIFTS          Y
  |  |  ------------------
  |  |  |  |  293|  4.08k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 431, False: 1]
  |  |  |  |  |  Branch (293:14): [True: 212, False: 219]
  |  |  |  |  |  Branch (293:14): [True: 432, False: 531]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  773|    963|                                       STB_C_LEX_C_ARITHEQ(if (p+2 != eof && p[2] == '=')
  774|    963|                                                              return stb__clex_token(lexer, CLEX_shreq, p,p+2);)
  775|    963|                                       return stb__clex_token(lexer, CLEX_shr, p,p+1);
  776|    963|                                    }
  777|    963|                              )
  778|    963|         }
  779|    539|         goto single_char;
  780|       |
  781|  1.67k|      case '"':
  ------------------
  |  Branch (781:7): [True: 1.67k, False: 122k]
  ------------------
  782|  1.67k|         STB_C_LEX_C_DQ_STRINGS(return stb__clex_parse_string(lexer, p, CLEX_dqstring);)
  ------------------
  |  |    7|  1.67k|#define STB_C_LEX_C_DQ_STRINGS      Y
  |  |  ------------------
  |  |  |  |  293|  1.67k|#define Y(a) a
  |  |  ------------------
  ------------------
  783|      0|         goto single_char;
  784|    990|      case '\'':
  ------------------
  |  Branch (784:7): [True: 990, False: 123k]
  ------------------
  785|    990|         STB_C_LEX_C_SQ_STRINGS(return stb__clex_parse_string(lexer, p, CLEX_sqstring);)
  ------------------
  |  |    8|    990|#define STB_C_LEX_C_SQ_STRINGS      Y
  |  |  ------------------
  |  |  |  |  293|    990|#define Y(a) a
  |  |  ------------------
  ------------------
  786|      0|         STB_C_LEX_C_CHARS(
  ------------------
  |  |    9|      0|#define STB_C_LEX_C_CHARS           Y
  |  |  ------------------
  |  |  |  |  293|      0|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 0, False: 0]
  |  |  |  |  |  Branch (293:14): [True: 0, False: 0]
  |  |  |  |  |  Branch (293:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  787|      0|         {
  788|      0|            char *start = p;
  789|      0|            lexer->int_number = stb__clex_parse_char(p+1, eof, &p);
  790|      0|            if (lexer->int_number < 0)
  791|      0|               return stb__clex_token(lexer, CLEX_parse_error, start,start);
  792|      0|            if (p == eof || *p != '\'')
  793|      0|               return stb__clex_token(lexer, CLEX_parse_error, start,p);
  794|      0|            return stb__clex_token(lexer, CLEX_charlit, start, p);
  795|      0|         })
  796|      0|         goto single_char;
  797|       |
  798|  4.88k|      case '0':
  ------------------
  |  Branch (798:7): [True: 4.88k, False: 119k]
  ------------------
  799|  4.88k|         #if defined(STB__clex_hex_ints) || defined(STB__clex_hex_floats)
  800|  4.88k|            if (p+1 != eof) {
  ------------------
  |  Branch (800:17): [True: 4.87k, False: 16]
  ------------------
  801|  4.87k|               if (p[1] == 'x' || p[1] == 'X') {
  ------------------
  |  Branch (801:20): [True: 1.72k, False: 3.14k]
  |  Branch (801:35): [True: 1.15k, False: 1.98k]
  ------------------
  802|  2.88k|                  char *q;
  803|       |
  804|  2.88k|                  #ifdef STB__clex_hex_floats
  805|  2.88k|                  for (q=p+2;
  806|  2.36M|                       q != eof && ((*q >= '0' && *q <= '9') || (*q >= 'a' && *q <= 'f') || (*q >= 'A' && *q <= 'F'));
  ------------------
  |  Branch (806:24): [True: 2.36M, False: 192]
  |  Branch (806:38): [True: 2.36M, False: 1.18k]
  |  Branch (806:51): [True: 3.44k, False: 2.36M]
  |  Branch (806:66): [True: 2.36M, False: 3.76k]
  |  Branch (806:79): [True: 2.36M, False: 1.18k]
  |  Branch (806:94): [True: 3.73k, False: 1.21k]
  |  Branch (806:107): [True: 2.25k, False: 1.48k]
  ------------------
  807|  2.36M|                       ++q);
  808|  2.88k|                  if (q != eof) {
  ------------------
  |  Branch (808:23): [True: 2.69k, False: 192]
  ------------------
  809|  2.69k|                     if (*q == '.' STB_C_LEX_FLOAT_NO_DECIMAL(|| *q == 'p' || *q == 'P')) {
  ------------------
  |  |   33|  2.11k|#define STB_C_LEX_FLOAT_NO_DECIMAL     Y
  |  |  ------------------
  |  |  |  |  293|  3.45k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 784, False: 1.33k]
  |  |  |  |  |  Branch (293:14): [True: 270, False: 1.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (809:26): [True: 574, False: 2.11k]
  ------------------
  810|       |                        #ifdef STB__CLEX_use_stdlib
  811|       |                        lexer->real_number = strtod((char *) p, (char**) &q);
  812|       |                        #else
  813|  1.62k|                        lexer->real_number = stb__clex_parse_float(lexer, p, &q);
  814|  1.62k|                        #endif
  815|       |
  816|  1.62k|                        if (p == q)
  ------------------
  |  Branch (816:29): [True: 64, False: 1.56k]
  ------------------
  817|     64|                           return stb__clex_token(lexer, CLEX_parse_error, p,q);
  818|  1.56k|                        return stb__clex_parse_suffixes(lexer, CLEX_floatlit, p,q, STB_C_LEX_FLOAT_SUFFIXES);
  ------------------
  |  |   25|  1.56k|#define STB_C_LEX_FLOAT_SUFFIXES    "uUlL"
  ------------------
  819|       |
  820|  1.62k|                     }
  821|  2.69k|                  }
  822|  1.25k|                  #endif // STB__clex_hex_floats
  823|       |
  824|  1.25k|                  #ifdef STB__clex_hex_ints
  825|       |                  #ifdef STB__CLEX_use_stdlib
  826|       |                  lexer->int_number = strtol((char *) p, (char **) &q, 16);
  827|       |                  #else
  828|  1.25k|                  {
  829|  1.25k|                     long n=0;
  830|  2.36M|                     for (q=p+2; q != eof; ++q) {
  ------------------
  |  Branch (830:34): [True: 2.36M, False: 192]
  ------------------
  831|  2.36M|                        int digit = stb__clex_hex_digit(*q);
  832|  2.36M|                        if (digit < 0) break;
  ------------------
  |  Branch (832:29): [True: 1.06k, False: 2.36M]
  ------------------
  833|       |                        // n*16 + digit > LONG_MAX
  834|       |                        // <=> n > (LONG_MAX - digit) / 16
  835|       |                        // (truncating div is fine here)
  836|  2.36M|                        if (n <= ((LONG_MAX - digit) >> 4))
  ------------------
  |  Branch (836:29): [True: 4.43k, False: 2.36M]
  ------------------
  837|  4.43k|                           n = n*16 + digit;
  838|  2.36M|                        else
  839|  2.36M|                           n = LONG_MAX; // strtol saturates at LONG_MAX
  840|  2.36M|                     }
  841|  1.25k|                     lexer->int_number = n;
  842|  1.25k|                  }
  843|  1.25k|                  #endif // STB__CLEX_use_stdlib
  844|  1.25k|                  if (q == p+2)
  ------------------
  |  Branch (844:23): [True: 65, False: 1.19k]
  ------------------
  845|     65|                     return stb__clex_token(lexer, CLEX_parse_error, p-2,p-1);
  846|  1.19k|                  return stb__clex_parse_suffixes(lexer, CLEX_intlit, p,q, STB_C_LEX_HEX_SUFFIXES);
  ------------------
  |  |   23|  1.19k|#define STB_C_LEX_HEX_SUFFIXES      "lL"
  ------------------
  847|  1.25k|                  #endif // STB__clex_hex_ints
  848|  1.25k|               }
  849|  4.87k|            }
  850|  2.00k|         #endif // defined(STB__clex_hex_ints) || defined(STB__clex_hex_floats)
  851|       |         // can't test for octal because we might parse '0.0' as float or as '0' '.' '0',
  852|       |         // so have to do float first
  853|       |
  854|       |         /* FALL THROUGH */
  855|  10.6k|      case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
  ------------------
  |  Branch (855:7): [True: 2.15k, False: 121k]
  |  Branch (855:17): [True: 1.09k, False: 122k]
  |  Branch (855:27): [True: 1.79k, False: 122k]
  |  Branch (855:37): [True: 617, False: 123k]
  |  Branch (855:47): [True: 715, False: 123k]
  |  Branch (855:57): [True: 1.20k, False: 122k]
  |  Branch (855:67): [True: 317, False: 123k]
  |  Branch (855:77): [True: 445, False: 123k]
  |  Branch (855:87): [True: 335, False: 123k]
  ------------------
  856|       |
  857|  10.6k|         #ifdef STB__clex_decimal_floats
  858|  10.6k|         {
  859|  10.6k|            char *q = p;
  860|  36.1k|            while (q != eof && (*q >= '0' && *q <= '9'))
  ------------------
  |  Branch (860:20): [True: 35.7k, False: 394]
  |  Branch (860:33): [True: 31.2k, False: 4.55k]
  |  Branch (860:46): [True: 25.4k, False: 5.72k]
  ------------------
  861|  25.4k|               ++q;
  862|  10.6k|            if (q != eof) {
  ------------------
  |  Branch (862:17): [True: 10.2k, False: 394]
  ------------------
  863|  10.2k|               if (*q == '.' STB_C_LEX_FLOAT_NO_DECIMAL(|| *q == 'e' || *q == 'E')) {
  ------------------
  |  |   33|  8.92k|#define STB_C_LEX_FLOAT_NO_DECIMAL     Y
  |  |  ------------------
  |  |  |  |  293|  17.1k|#define Y(a) a
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:14): [True: 724, False: 8.20k]
  |  |  |  |  |  Branch (293:14): [True: 1.04k, False: 7.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (863:20): [True: 1.35k, False: 8.92k]
  ------------------
  864|       |                  #ifdef STB__CLEX_use_stdlib
  865|       |                  lexer->real_number = strtod((char *) p, (char**) &q);
  866|       |                  #else
  867|  3.12k|                  lexer->real_number = stb__clex_parse_float(lexer, p, &q);
  868|  3.12k|                  #endif
  869|       |
  870|  3.12k|                  return stb__clex_parse_suffixes(lexer, CLEX_floatlit, p,q, STB_C_LEX_FLOAT_SUFFIXES);
  ------------------
  |  |   25|  3.12k|#define STB_C_LEX_FLOAT_SUFFIXES    "uUlL"
  ------------------
  871|       |
  872|  3.12k|               }
  873|  10.2k|            }
  874|  10.6k|         }
  875|  7.55k|         #endif // STB__clex_decimal_floats
  876|       |
  877|  7.55k|         #ifdef STB__clex_octal_ints
  878|  7.55k|         if (p[0] == '0') {
  ------------------
  |  Branch (878:14): [True: 1.23k, False: 6.31k]
  ------------------
  879|  1.23k|            char *q = p;
  880|       |            #ifdef STB__CLEX_use_stdlib
  881|       |            lexer->int_number = strtol((char *) p, (char **) &q, 8);
  882|       |            #else
  883|  1.23k|            long n=0;
  884|  5.35k|            while (q != eof) {
  ------------------
  |  Branch (884:20): [True: 5.20k, False: 150]
  ------------------
  885|  5.20k|               if (*q >= '0' && *q <= '7') {
  ------------------
  |  Branch (885:20): [True: 4.69k, False: 509]
  |  Branch (885:33): [True: 4.11k, False: 573]
  ------------------
  886|  4.11k|                  int digit = *q - '0';
  887|       |                  // see hex_ints case for derivation
  888|  4.11k|                  if (n <= ((LONG_MAX - digit) >> 3))
  ------------------
  |  Branch (888:23): [True: 3.89k, False: 222]
  ------------------
  889|  3.89k|                     n = n*8 + digit;
  890|    222|                  else
  891|    222|                     n = LONG_MAX; // strtol saturates at LONG_MAX
  892|  4.11k|               } else
  893|  1.08k|                  break;
  894|  4.11k|               ++q;
  895|  4.11k|            }
  896|  1.23k|            if (q != eof && (*q == '8' || *q=='9'))
  ------------------
  |  Branch (896:17): [True: 1.08k, False: 150]
  |  Branch (896:30): [True: 1, False: 1.08k]
  |  Branch (896:43): [True: 2, False: 1.07k]
  ------------------
  897|      3|               return stb__clex_token(lexer, CLEX_parse_error, p, q);
  898|  1.22k|            lexer->int_number = n;
  899|  1.22k|            #endif // STB__CLEX_use_stdlib
  900|  1.22k|            return stb__clex_parse_suffixes(lexer, CLEX_intlit, p,q, STB_C_LEX_OCTAL_SUFFIXES);
  ------------------
  |  |   24|  1.22k|#define STB_C_LEX_OCTAL_SUFFIXES    "lL"
  ------------------
  901|  1.23k|         }
  902|  6.31k|         #endif // STB__clex_octal_ints
  903|       |
  904|  6.31k|         #ifdef STB__clex_decimal_ints
  905|  6.31k|         {
  906|  6.31k|            char *q = p;
  907|       |            #ifdef STB__CLEX_use_stdlib
  908|       |            lexer->int_number = strtol((char *) p, (char **) &q, 10);
  909|       |            #else
  910|  6.31k|            long n=0;
  911|  23.9k|            while (q != eof) {
  ------------------
  |  Branch (911:20): [True: 23.7k, False: 241]
  ------------------
  912|  23.7k|               if (*q >= '0' && *q <= '9') {
  ------------------
  |  Branch (912:20): [True: 21.0k, False: 2.68k]
  |  Branch (912:33): [True: 17.6k, False: 3.38k]
  ------------------
  913|  17.6k|                  int digit = *q - '0';
  914|       |                  // see hex_ints case for derivation
  915|  17.6k|                  if (n <= (LONG_MAX - digit) / 10)
  ------------------
  |  Branch (915:23): [True: 17.2k, False: 383]
  ------------------
  916|  17.2k|                     n = n*10 + digit;
  917|    383|                  else
  918|    383|                     n = LONG_MAX; // strtol saturates at LONG_MAX
  919|  17.6k|               } else
  920|  6.07k|                  break;
  921|  17.6k|               ++q;
  922|  17.6k|            }
  923|  6.31k|            lexer->int_number = n;
  924|  6.31k|            #endif
  925|  6.31k|            return stb__clex_parse_suffixes(lexer, CLEX_intlit, p,q, STB_C_LEX_DECIMAL_SUFFIXES);
  ------------------
  |  |   22|  6.31k|#define STB_C_LEX_DECIMAL_SUFFIXES  "uUlL"
  ------------------
  926|  7.55k|         }
  927|      0|         #endif // STB__clex_decimal_ints
  928|      0|         goto single_char;
  929|   124k|   }
  930|   124k|}
c_lexer.c:_ZL17stb__clex_iswhitei:
  346|   189k|{
  347|   189k|   return x == ' ' || x == '\t' || x == '\r' || x == '\n' || x == '\f';
  ------------------
  |  Branch (347:11): [True: 51.6k, False: 137k]
  |  Branch (347:23): [True: 649, False: 137k]
  |  Branch (347:36): [True: 798, False: 136k]
  |  Branch (347:49): [True: 9.08k, False: 127k]
  |  Branch (347:62): [True: 29, False: 127k]
  ------------------
  348|   189k|}
c_lexer.c:_ZL15stb__clex_tokenP9stb_lexeriPcS1_:
  330|   124k|{
  331|   124k|   lexer->token = token;
  332|   124k|   lexer->where_firstchar = start;
  333|   124k|   lexer->where_lastchar = end;
  334|   124k|   lexer->parse_point = end+1;
  335|   124k|   return 1;
  336|   124k|}
c_lexer.c:_ZL13stb__clex_eofP9stb_lexer:
  340|  1.81k|{
  341|  1.81k|   lexer->token = CLEX_eof;
  342|  1.81k|   return 0;
  343|  1.81k|}
c_lexer.c:_ZL22stb__clex_parse_stringP9stb_lexerPci:
  567|  2.66k|{
  568|  2.66k|   char *eof = lexer->eof;
  569|  2.66k|   char *start = p;
  570|  2.66k|   char delim = *p++; // grab the " or ' for later matching
  571|  2.66k|   char *out = lexer->string_storage;
  572|  2.66k|   char *outend = lexer->string_storage + lexer->string_storage_len;
  573|       |
  574|   230k|   while (p != eof && *p != 0 && *p != delim) {
  ------------------
  |  Branch (574:11): [True: 230k, False: 287]
  |  Branch (574:23): [True: 230k, False: 6]
  |  Branch (574:34): [True: 228k, False: 2.34k]
  ------------------
  575|   228k|      int n;
  576|   228k|      if (*p == '\\') {
  ------------------
  |  Branch (576:11): [True: 8.98k, False: 219k]
  ------------------
  577|  8.98k|         char *q;
  578|  8.98k|         n = stb__clex_parse_char(p, lexer->eof, &q);
  579|  8.98k|         if (n < 0)
  ------------------
  |  Branch (579:14): [True: 26, False: 8.96k]
  ------------------
  580|     26|            return stb__clex_token(lexer, CLEX_parse_error, start, q);
  581|  8.96k|         p = q;
  582|   219k|      } else {
  583|       |         // @OPTIMIZE: could speed this up by looping-while-not-backslash
  584|   219k|         n = (unsigned char) *p++;
  585|   219k|      }
  586|   228k|      if (out == outend)
  ------------------
  |  Branch (586:11): [True: 1, False: 228k]
  ------------------
  587|      1|         return stb__clex_token(lexer, CLEX_parse_error, start, p);
  588|       |      // @TODO expand unicode escapes to UTF8
  589|   228k|      *out++ = (char) n;
  590|   228k|   }
  591|  2.64k|   if (p == eof || *p == 0 || out == outend) // ran off the end without a closing delimiter, or out of space
  ------------------
  |  Branch (591:8): [True: 287, False: 2.35k]
  |  Branch (591:20): [True: 6, False: 2.34k]
  |  Branch (591:31): [True: 2, False: 2.34k]
  ------------------
  592|    295|      return stb__clex_token(lexer, CLEX_parse_error, start, p);
  593|  2.34k|   *out = 0;
  594|  2.34k|   lexer->string = lexer->string_storage;
  595|  2.34k|   lexer->string_len = (int) (out - lexer->string_storage);
  596|  2.34k|   return stb__clex_token(lexer, type, start, p);
  597|  2.64k|}
c_lexer.c:_ZL20stb__clex_parse_charPcS_PS_:
  534|  8.98k|{
  535|  8.98k|   if (eof && p == eof) { *q = p; return -1; }
  ------------------
  |  Branch (535:8): [True: 8.98k, False: 0]
  |  Branch (535:15): [True: 0, False: 8.98k]
  ------------------
  536|  8.98k|   if (*p == '\\') {
  ------------------
  |  Branch (536:8): [True: 8.98k, False: 0]
  ------------------
  537|  8.98k|      if (eof && p+1 == eof) { *q = p+1; return -1; } // escaped char runs off the end
  ------------------
  |  Branch (537:11): [True: 8.98k, False: 0]
  |  Branch (537:18): [True: 14, False: 8.97k]
  ------------------
  538|  8.97k|      *q = p+2; // tentatively guess we'll parse two characters
  539|  8.97k|      switch(p[1]) {
  ------------------
  |  Branch (539:14): [True: 8.76k, False: 210]
  ------------------
  540|    513|         case '\\': return '\\';
  ------------------
  |  Branch (540:10): [True: 513, False: 8.45k]
  ------------------
  541|    226|         case '\'': return '\'';
  ------------------
  |  Branch (541:10): [True: 226, False: 8.74k]
  ------------------
  542|    345|         case '"': return '"';
  ------------------
  |  Branch (542:10): [True: 345, False: 8.62k]
  ------------------
  543|    206|         case 't': return '\t';
  ------------------
  |  Branch (543:10): [True: 206, False: 8.76k]
  ------------------
  544|    205|         case 'f': return '\f';
  ------------------
  |  Branch (544:10): [True: 205, False: 8.76k]
  ------------------
  545|    663|         case 'n': return '\n';
  ------------------
  |  Branch (545:10): [True: 663, False: 8.30k]
  ------------------
  546|    253|         case 'r': return '\r';
  ------------------
  |  Branch (546:10): [True: 253, False: 8.71k]
  ------------------
  547|      0|#ifdef STB__clex_octal_chars
  548|  1.15k|         case '0': case '1': case '2': case '3':
  ------------------
  |  Branch (548:10): [True: 451, False: 8.52k]
  |  Branch (548:20): [True: 301, False: 8.67k]
  |  Branch (548:30): [True: 202, False: 8.77k]
  |  Branch (548:40): [True: 204, False: 8.76k]
  ------------------
  549|  2.19k|         case '4': case '5': case '6': case '7':
  ------------------
  |  Branch (549:10): [True: 389, False: 8.58k]
  |  Branch (549:20): [True: 205, False: 8.76k]
  |  Branch (549:30): [True: 217, False: 8.75k]
  |  Branch (549:40): [True: 227, False: 8.74k]
  ------------------
  550|  2.19k|            return stb__clex_parse_octal(eof, p, q);
  551|       |#else
  552|       |         case '0': return '\0';
  553|       |#endif
  554|      0|#ifdef STB__clex_hex_chars
  555|  4.15k|         case 'x': case 'X': return stb__clex_parse_hex(eof, p, q);
  ------------------
  |  Branch (555:10): [True: 3.44k, False: 5.53k]
  |  Branch (555:20): [True: 714, False: 8.25k]
  ------------------
  556|       |#else
  557|       |         case 'x': case 'X': return -1;
  558|       |#endif
  559|      1|         case 'u': return -1; // @TODO unicode constants
  ------------------
  |  Branch (559:10): [True: 1, False: 8.97k]
  ------------------
  560|  8.97k|      }
  561|  8.97k|   }
  562|    210|   *q = p+1;
  563|    210|   return (unsigned char) *p;
  564|  8.98k|}
c_lexer.c:_ZL21stb__clex_parse_octalPcS_PS_:
  480|  2.19k|{
  481|  2.19k|  unsigned int octchar = 0;
  482|       |
  483|  2.19k|  p++; // skipping first char
  484|  5.27k|  while (p != eof && *p >= '0' && *p <= '7') {
  ------------------
  |  Branch (484:10): [True: 5.20k, False: 74]
  |  Branch (484:22): [True: 4.90k, False: 300]
  |  Branch (484:35): [True: 3.07k, False: 1.82k]
  ------------------
  485|  3.07k|    octchar = (octchar << 3) + (*p++) - '0';
  486|  3.07k|    if (octchar >= 256)
  ------------------
  |  Branch (486:9): [True: 1, False: 3.07k]
  ------------------
  487|      1|      return -1;
  488|  3.07k|  }
  489|  2.19k|  *q = p;
  490|       |
  491|  2.19k|  return octchar;
  492|  2.19k|}
c_lexer.c:_ZL19stb__clex_parse_hexPcS_PS_:
  513|  4.15k|{
  514|  4.15k|  unsigned int hexchar = 0;
  515|  4.15k|  int digit = 0;
  516|       |
  517|  4.15k|  p++;
  518|  4.15k|  p++; // skipping first two chars: '\\' and 'x' or 'X'
  519|  5.34k|  while (p != eof) {
  ------------------
  |  Branch (519:10): [True: 5.29k, False: 48]
  ------------------
  520|  5.29k|    digit = stb__clex_hex_digit(*p);
  521|  5.29k|    if (digit < 0) break;
  ------------------
  |  Branch (521:9): [True: 4.09k, False: 1.19k]
  ------------------
  522|  1.19k|    hexchar = (hexchar << 4) + digit;
  523|  1.19k|    p++;
  524|  1.19k|    if (hexchar >= 256)
  ------------------
  |  Branch (524:9): [True: 10, False: 1.18k]
  ------------------
  525|     10|      return -1;
  526|  1.19k|  }
  527|       |
  528|  4.14k|  *q = p;
  529|  4.14k|  return hexchar;
  530|  4.15k|}
c_lexer.c:_ZL21stb__clex_parse_floatP9stb_lexerPcPS1_:
  393|  4.75k|{
  394|  4.75k|   char *s = p, *eof = lexer->eof;
  395|  4.75k|   double value=0;
  396|  4.75k|   int base=10;
  397|  4.75k|   int exponent=0;
  398|       |
  399|  4.75k|#ifdef STB__clex_hex_floats
  400|  4.75k|   if (*p == '0') {
  ------------------
  |  Branch (400:8): [True: 2.40k, False: 2.35k]
  ------------------
  401|  2.40k|      if (p+1 != eof) {
  ------------------
  |  Branch (401:11): [True: 2.40k, False: 0]
  ------------------
  402|  2.40k|         if (p[1] == 'x' || p[1] == 'X') {
  ------------------
  |  Branch (402:14): [True: 994, False: 1.40k]
  |  Branch (402:29): [True: 634, False: 772]
  ------------------
  403|  1.62k|            base=16;
  404|  1.62k|            p += 2;
  405|  1.62k|         }
  406|  2.40k|      }
  407|  2.40k|   }
  408|  4.75k|#endif
  409|       |
  410|  9.71k|   while (p != eof) {
  ------------------
  |  Branch (410:11): [True: 9.71k, False: 0]
  ------------------
  411|  9.71k|      if (*p >= '0' && *p <= '9')
  ------------------
  |  Branch (411:11): [True: 7.78k, False: 1.92k]
  |  Branch (411:24): [True: 3.92k, False: 3.86k]
  ------------------
  412|  3.92k|         value = value*base + (*p++ - '0');
  413|  5.78k|#ifdef STB__clex_hex_floats
  414|  5.78k|      else if (base == 16 && *p >= 'a' && *p <= 'f')
  ------------------
  |  Branch (414:16): [True: 2.66k, False: 3.12k]
  |  Branch (414:30): [True: 1.30k, False: 1.36k]
  |  Branch (414:43): [True: 519, False: 784]
  ------------------
  415|    519|         value = value*base + 10 + (*p++ - 'a');
  416|  5.26k|      else if (base == 16 && *p >= 'A' && *p <= 'F')
  ------------------
  |  Branch (416:16): [True: 2.14k, False: 3.12k]
  |  Branch (416:30): [True: 1.57k, False: 574]
  |  Branch (416:43): [True: 518, False: 1.05k]
  ------------------
  417|    518|         value = value*base + 10 + (*p++ - 'A');
  418|  4.75k|#endif
  419|  4.75k|      else
  420|  4.75k|         break;
  421|  9.71k|   }
  422|       |
  423|  4.75k|   if (p != eof && *p == '.') {
  ------------------
  |  Branch (423:8): [True: 4.75k, False: 0]
  |  Branch (423:20): [True: 1.92k, False: 2.82k]
  ------------------
  424|  1.92k|      double pow, addend = 0;
  425|  1.92k|      ++p;
  426|  4.09k|      for (pow=1; p != eof; pow*=base) {
  ------------------
  |  Branch (426:19): [True: 4.02k, False: 71]
  ------------------
  427|  4.02k|         if (*p >= '0' && *p <= '9')
  ------------------
  |  Branch (427:14): [True: 3.27k, False: 750]
  |  Branch (427:27): [True: 1.66k, False: 1.60k]
  ------------------
  428|  1.66k|            addend = addend*base + (*p++ - '0');
  429|  2.35k|#ifdef STB__clex_hex_floats
  430|  2.35k|         else if (base == 16 && *p >= 'a' && *p <= 'f')
  ------------------
  |  Branch (430:19): [True: 1.03k, False: 1.32k]
  |  Branch (430:33): [True: 564, False: 466]
  |  Branch (430:46): [True: 196, False: 368]
  ------------------
  431|    196|            addend = addend*base + 10 + (*p++ - 'a');
  432|  2.15k|         else if (base == 16 && *p >= 'A' && *p <= 'F')
  ------------------
  |  Branch (432:19): [True: 834, False: 1.32k]
  |  Branch (432:33): [True: 825, False: 9]
  |  Branch (432:46): [True: 300, False: 525]
  ------------------
  433|    300|            addend = addend*base + 10 + (*p++ - 'A');
  434|  1.85k|#endif
  435|  1.85k|         else
  436|  1.85k|            break;
  437|  4.02k|      }
  438|  1.92k|      value += addend / pow;
  439|  1.92k|   }
  440|  4.75k|#ifdef STB__clex_hex_floats
  441|  4.75k|   if (base == 16) {
  ------------------
  |  Branch (441:8): [True: 1.62k, False: 3.12k]
  ------------------
  442|       |      // exponent required for hex float literal
  443|  1.62k|      if (p == eof || (*p != 'p' && *p != 'P')) {
  ------------------
  |  Branch (443:11): [True: 40, False: 1.58k]
  |  Branch (443:24): [True: 443, False: 1.14k]
  |  Branch (443:37): [True: 24, False: 419]
  ------------------
  444|     64|         *q = s;
  445|     64|         return 0;
  446|     64|      }
  447|  1.56k|      exponent = 1;
  448|  1.56k|   } else
  449|  3.12k|#endif
  450|  3.12k|      exponent = p == eof ? 0 : (*p == 'e' || *p == 'E');
  ------------------
  |  Branch (450:18): [True: 31, False: 3.09k]
  |  Branch (450:34): [True: 827, False: 2.26k]
  |  Branch (450:47): [True: 1.04k, False: 1.21k]
  ------------------
  451|       |
  452|  4.68k|   if (exponent) {
  ------------------
  |  Branch (452:8): [True: 3.43k, False: 1.24k]
  ------------------
  453|  3.43k|      int sign = p+1 == eof ? 0 : (p[1] == '-');
  ------------------
  |  Branch (453:18): [True: 73, False: 3.36k]
  ------------------
  454|  3.43k|      unsigned int exponent=0;
  455|  3.43k|      double power=1;
  456|  3.43k|      ++p;
  457|  3.43k|      if (p != eof && (*p == '-' || *p == '+'))
  ------------------
  |  Branch (457:11): [True: 3.36k, False: 73]
  |  Branch (457:24): [True: 400, False: 2.96k]
  |  Branch (457:37): [True: 442, False: 2.52k]
  ------------------
  458|    842|         ++p;
  459|  6.16k|      while (p != eof && *p >= '0' && *p <= '9')
  ------------------
  |  Branch (459:14): [True: 5.92k, False: 243]
  |  Branch (459:26): [True: 3.92k, False: 1.99k]
  |  Branch (459:39): [True: 2.72k, False: 1.19k]
  ------------------
  460|  2.72k|         exponent = exponent*10 + (*p++ - '0');
  461|       |
  462|  3.43k|#ifdef STB__clex_hex_floats
  463|  3.43k|      if (base == 16)
  ------------------
  |  Branch (463:11): [True: 1.56k, False: 1.87k]
  ------------------
  464|  1.56k|         power = stb__clex_pow(2, exponent);
  465|  1.87k|      else
  466|  1.87k|#endif
  467|  1.87k|         power = stb__clex_pow(10, exponent);
  468|  3.43k|      if (sign)
  ------------------
  |  Branch (468:11): [True: 400, False: 3.03k]
  ------------------
  469|    400|         value /= power;
  470|  3.03k|      else
  471|  3.03k|         value *= power;
  472|  3.43k|   }
  473|  4.68k|   *q = p;
  474|  4.68k|   return value;
  475|  4.75k|}
c_lexer.c:_ZL13stb__clex_powdj:
  382|  3.43k|{
  383|  3.43k|   double value=1;
  384|  10.4k|   for ( ; exponent; exponent >>= 1) {
  ------------------
  |  Branch (384:12): [True: 7.01k, False: 3.43k]
  ------------------
  385|  7.01k|      if (exponent & 1)
  ------------------
  |  Branch (385:11): [True: 4.36k, False: 2.64k]
  ------------------
  386|  4.36k|         value *= base;
  387|  7.01k|      base *= base;
  388|  7.01k|   }
  389|  3.43k|   return value;
  390|  3.43k|}
c_lexer.c:_ZL24stb__clex_parse_suffixesP9stb_lexerlPcS1_PKc:
  360|  13.4k|{
  361|  13.4k|   #ifdef STB__clex_parse_suffixes
  362|  13.4k|   char *eof = lexer->eof;
  363|       |
  364|  13.4k|   lexer->string = lexer->string_storage;
  365|  13.4k|   lexer->string_len = 0;
  366|       |
  367|   312k|   while (cur != eof && ((*cur >= 'a' && *cur <= 'z') || (*cur >= 'A' && *cur <= 'Z'))) {
  ------------------
  |  Branch (367:11): [True: 311k, False: 920]
  |  Branch (367:27): [True: 298k, False: 13.2k]
  |  Branch (367:42): [True: 296k, False: 2.37k]
  |  Branch (367:59): [True: 6.35k, False: 9.21k]
  |  Branch (367:74): [True: 3.13k, False: 3.22k]
  ------------------
  368|   299k|      if (stb__strchr(lexer->eof, suffixes, *cur) == 0)
  ------------------
  |  Branch (368:11): [True: 63, False: 299k]
  ------------------
  369|     63|         return stb__clex_token(lexer, CLEX_parse_error, start, cur);
  370|   299k|      if (lexer->string_len+1 >= lexer->string_storage_len)
  ------------------
  |  Branch (370:11): [True: 4, False: 299k]
  ------------------
  371|      4|         return stb__clex_token(lexer, CLEX_parse_error, start, cur);
  372|   299k|      lexer->string[lexer->string_len++] = *cur++;
  373|   299k|   }
  374|       |   #else
  375|       |   (void) suffixes; (void) stb__strchr; // attempt to suppress warnings
  376|       |   #endif
  377|  13.3k|   return stb__clex_token(lexer, tokenid, start, cur-1);
  378|  13.4k|}
c_lexer.c:_ZL11stb__strchrPcPKci:
  351|   299k|{
  352|   570k|   for (; str != eof && *str; ++str)
  ------------------
  |  Branch (352:11): [True: 570k, False: 0]
  |  Branch (352:25): [True: 570k, False: 63]
  ------------------
  353|   570k|      if (*str == ch)
  ------------------
  |  Branch (353:11): [True: 299k, False: 270k]
  ------------------
  354|   299k|         return str;
  355|     63|   return 0;
  356|   299k|}
c_lexer.c:_ZL19stb__clex_hex_digitc:
  497|  2.37M|{
  498|  2.37M|  if (x >= '0' && x <= '9')
  ------------------
  |  Branch (498:7): [True: 2.37M, False: 910]
  |  Branch (498:19): [True: 3.78k, False: 2.36M]
  ------------------
  499|  3.78k|    return x - '0';
  500|       |
  501|  2.36M|  if (x >= 'A' && x <= 'F')
  ------------------
  |  Branch (501:7): [True: 2.36M, False: 943]
  |  Branch (501:19): [True: 2.05k, False: 2.36M]
  ------------------
  502|  2.05k|    return (x - 'A') + 10;
  503|       |
  504|  2.36M|  if (x >= 'a' && x <= 'f')
  ------------------
  |  Branch (504:7): [True: 2.36M, False: 1.87k]
  |  Branch (504:19): [True: 2.36M, False: 3.29k]
  ------------------
  505|  2.36M|    return (x - 'a') + 10;
  506|       |
  507|  5.16k|  return -1;
  508|  2.36M|}

LLVMFuzzerTestOneInput:
   55|  2.38k|{
   56|  2.38k|   char *input_stream = (char *)data;
   57|  2.38k|   char *input_end = input_stream+size-1;
   58|  2.38k|   int len = 0x10000;
   59|  2.38k|   char *store = (char *)malloc(len);
   60|  2.38k|   stb_lexer lex;
   61|       |
   62|  2.38k|   if (size >= 3) {
  ------------------
  |  Branch (62:8): [True: 2.38k, False: 2]
  ------------------
   63|  2.38k|      stb_c_lexer_init(&lex, input_stream, input_end, store, len);
   64|   125k|      while (stb_c_lexer_get_token(&lex)) {
  ------------------
  |  Branch (64:14): [True: 124k, False: 1.81k]
  ------------------
   65|   124k|         if (lex.token == CLEX_parse_error) {
  ------------------
  |  Branch (65:14): [True: 568, False: 123k]
  ------------------
   66|    568|            break;
   67|    568|         }
   68|   124k|      }
   69|  2.38k|   }
   70|       |
   71|  2.38k|   free(store);
   72|  2.38k|   return 0;
   73|  2.38k|}

