LLVMFuzzerTestOneInput:
   24|  8.99k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   25|  8.99k|	FuzzedDataProvider fuzzed_data(data, size);
   26|       |
   27|  8.99k|	cctz::time_zone lax;
   28|  8.99k|	std::string tz = fuzzed_data.ConsumeRandomLengthString();
   29|  8.99k|	if (load_time_zone(tz, &lax)) {
  ------------------
  |  Branch (29:6): [True: 8.48k, False: 509]
  ------------------
   30|  8.48k|		std::chrono::system_clock::time_point tp;
   31|  8.48k|		std::string date_format = fuzzed_data.ConsumeRandomLengthString();
   32|  8.48k|		std::string parse_format = fuzzed_data.ConsumeRandomLengthString();
   33|  8.48k|		cctz::parse(parse_format, date_format, lax, &tp);
   34|       |
   35|  8.48k|		const auto t1 = cctz::convert(cctz::civil_second(
   36|  8.48k|				fuzzed_data.ConsumeIntegral<uint32_t>(),
   37|  8.48k|				fuzzed_data.ConsumeIntegral<uint32_t>(),
   38|  8.48k|				fuzzed_data.ConsumeIntegral<uint32_t>(),
   39|  8.48k|				fuzzed_data.ConsumeIntegral<uint32_t>(),
   40|  8.48k|				fuzzed_data.ConsumeIntegral<uint32_t>(),
   41|  8.48k|				fuzzed_data.ConsumeIntegral<uint32_t>()), lax);
   42|  8.48k|		std::string format = fuzzed_data.ConsumeRandomLengthString();
   43|  8.48k|		cctz::format(format, t1, lax);
   44|  8.48k|	}
   45|       |
   46|  8.99k|	return 0;
   47|  8.99k|}

_ZN4cctz6detail10civil_timeINS0_10second_tagEEC2Ellllll:
  359|  18.4k|      : civil_time(impl::n_sec(y, m, d, hh, mm, ss)) {}
_ZN4cctz6detail4impl5n_secEllllll:
  213|   347k|                         diff_t ss) noexcept {
  214|       |  // Optimization for when (non-constexpr) fields are already normalized.
  215|   347k|  if (0 <= ss && ss < 60) {
  ------------------
  |  Branch (215:7): [True: 285k, False: 62.4k]
  |  Branch (215:18): [True: 279k, False: 6.31k]
  ------------------
  216|   279k|    const second_t nss = static_cast<second_t>(ss);
  217|   279k|    if (0 <= mm && mm < 60) {
  ------------------
  |  Branch (217:9): [True: 270k, False: 8.27k]
  |  Branch (217:20): [True: 61.5k, False: 209k]
  ------------------
  218|  61.5k|      const minute_t nmm = static_cast<minute_t>(mm);
  219|  61.5k|      if (0 <= hh && hh < 24) {
  ------------------
  |  Branch (219:11): [True: 61.5k, False: 0]
  |  Branch (219:22): [True: 61.3k, False: 130]
  ------------------
  220|  61.3k|        const hour_t nhh = static_cast<hour_t>(hh);
  221|  61.3k|        if (1 <= d && d <= 28 && 1 <= m && m <= 12) {
  ------------------
  |  Branch (221:13): [True: 55.3k, False: 6.00k]
  |  Branch (221:23): [True: 37.5k, False: 17.8k]
  |  Branch (221:34): [True: 37.5k, False: 3]
  |  Branch (221:44): [True: 37.3k, False: 117]
  ------------------
  222|  37.3k|          const day_t nd = static_cast<day_t>(d);
  223|  37.3k|          const month_t nm = static_cast<month_t>(m);
  224|  37.3k|          return fields(y, nm, nd, nhh, nmm, nss);
  225|  37.3k|        }
  226|  24.0k|        return n_mon(y, m, d, 0, nhh, nmm, nss);
  227|  61.3k|      }
  228|    130|      return n_hour(y, m, d, hh / 24, hh % 24, nmm, nss);
  229|  61.5k|    }
  230|   217k|    return n_min(y, m, d, hh, mm / 60, mm % 60, nss);
  231|   279k|  }
  232|  68.8k|  diff_t cm = ss / 60;
  233|  68.8k|  ss %= 60;
  234|  68.8k|  if (ss < 0) {
  ------------------
  |  Branch (234:7): [True: 62.4k, False: 6.31k]
  ------------------
  235|  62.4k|    cm -= 1;
  236|  62.4k|    ss += 60;
  237|  62.4k|  }
  238|  68.8k|  return n_min(y, m, d, hh, mm / 60 + cm / 60, mm % 60 + cm % 60,
  239|  68.8k|               static_cast<second_t>(ss));
  240|   347k|}
_ZN4cctz6detail6fieldsC2Elaaaaa:
   56|   538k|      : y(year), m(month), d(day), hh(hour), mm(minute), ss(second) {}
_ZN4cctz6detail4impl5n_monEllllaaa:
  180|   310k|                         hour_t hh, minute_t mm, second_t ss) noexcept {
  181|   310k|  if (m != 12) {
  ------------------
  |  Branch (181:7): [True: 306k, False: 3.60k]
  ------------------
  182|   306k|    y += m / 12;
  183|   306k|    m %= 12;
  184|   306k|    if (m <= 0) {
  ------------------
  |  Branch (184:9): [True: 6.25k, False: 300k]
  ------------------
  185|  6.25k|      y -= 1;
  186|  6.25k|      m += 12;
  187|  6.25k|    }
  188|   306k|  }
  189|   310k|  return n_day(y, static_cast<month_t>(m), d, cd, hh, mm, ss);
  190|   310k|}
_ZN4cctz6detail4impl5n_dayElallaaa:
  114|   315k|                         hour_t hh, minute_t mm, second_t ss) noexcept {
  115|   315k|  year_t ey = y % 400;
  116|   315k|  const year_t oey = ey;
  117|   315k|  ey += (cd / 146097) * 400;
  118|   315k|  cd %= 146097;
  119|   315k|  if (cd < 0) {
  ------------------
  |  Branch (119:7): [True: 10.2k, False: 305k]
  ------------------
  120|  10.2k|    ey -= 400;
  121|  10.2k|    cd += 146097;
  122|  10.2k|  }
  123|   315k|  ey += (d / 146097) * 400;
  124|   315k|  d = d % 146097 + cd;
  125|   315k|  if (d > 0) {
  ------------------
  |  Branch (125:7): [True: 309k, False: 6.03k]
  ------------------
  126|   309k|    if (d > 146097) {
  ------------------
  |  Branch (126:9): [True: 1.39k, False: 308k]
  ------------------
  127|  1.39k|      ey += 400;
  128|  1.39k|      d -= 146097;
  129|  1.39k|    }
  130|   309k|  } else {
  131|  6.03k|    if (d > -365) {
  ------------------
  |  Branch (131:9): [True: 6.03k, False: 0]
  ------------------
  132|       |      // We often hit the previous year when stepping a civil time backwards,
  133|       |      // so special case it to avoid counting up by 100/4/1-year chunks.
  134|  6.03k|      ey -= 1;
  135|  6.03k|      d += days_per_year(ey, m);
  136|  6.03k|    } else {
  137|      0|      ey -= 400;
  138|      0|      d += 146097;
  139|      0|    }
  140|  6.03k|  }
  141|   315k|  if (d > 365) {
  ------------------
  |  Branch (141:7): [True: 138k, False: 177k]
  ------------------
  142|   138k|    int yi = year_index(ey, m);  // Index into Gregorian 400 year cycle.
  143|   320k|    for (;;) {
  144|   320k|      int n = days_per_century(yi);
  145|   320k|      if (d <= n) break;
  ------------------
  |  Branch (145:11): [True: 138k, False: 182k]
  ------------------
  146|   182k|      d -= n;
  147|   182k|      ey += 100;
  148|   182k|      yi += 100;
  149|   182k|      if (yi >= 400) yi -= 400;
  ------------------
  |  Branch (149:11): [True: 82.3k, False: 100k]
  ------------------
  150|   182k|    }
  151|  1.84M|    for (;;) {
  152|  1.84M|      int n = days_per_4years(yi);
  153|  1.84M|      if (d <= n) break;
  ------------------
  |  Branch (153:11): [True: 138k, False: 1.70M]
  ------------------
  154|  1.70M|      d -= n;
  155|  1.70M|      ey += 4;
  156|  1.70M|      yi += 4;
  157|  1.70M|      if (yi >= 400) yi -= 400;
  ------------------
  |  Branch (157:11): [True: 33.6k, False: 1.67M]
  ------------------
  158|  1.70M|    }
  159|   352k|    for (;;) {
  160|   352k|      int n = days_per_year(ey, m);
  161|   352k|      if (d <= n) break;
  ------------------
  |  Branch (161:11): [True: 138k, False: 214k]
  ------------------
  162|   214k|      d -= n;
  163|   214k|      ++ey;
  164|   214k|    }
  165|   138k|  }
  166|   315k|  if (d > 28) {
  ------------------
  |  Branch (166:7): [True: 218k, False: 97.4k]
  ------------------
  167|  1.05M|    for (;;) {
  168|  1.05M|      int n = days_per_month(ey, m);
  169|  1.05M|      if (d <= n) break;
  ------------------
  |  Branch (169:11): [True: 218k, False: 838k]
  ------------------
  170|   838k|      d -= n;
  171|   838k|      if (++m > 12) {
  ------------------
  |  Branch (171:11): [True: 7.64k, False: 830k]
  ------------------
  172|  7.64k|        ++ey;
  173|  7.64k|        m = 1;
  174|  7.64k|      }
  175|   838k|    }
  176|   218k|  }
  177|   315k|  return fields(y + (ey - oey), m, static_cast<day_t>(d), hh, mm, ss);
  178|   315k|}
_ZN4cctz6detail4impl13days_per_yearEla:
   91|   358k|CONSTEXPR_F int days_per_year(year_t y, month_t m) noexcept {
   92|   358k|  return is_leap_year(y + (m > 2)) ? 366 : 365;
  ------------------
  |  Branch (92:10): [True: 72.1k, False: 286k]
  ------------------
   93|   358k|}
_ZN4cctz6detail4impl12is_leap_yearEl:
   78|   502k|CONSTEXPR_F bool is_leap_year(year_t y) noexcept {
   79|   502k|  return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
  ------------------
  |  Branch (79:10): [True: 108k, False: 393k]
  |  Branch (79:25): [True: 98.6k, False: 9.69k]
  |  Branch (79:41): [True: 6.25k, False: 3.44k]
  ------------------
   80|   502k|}
_ZN4cctz6detail4impl10year_indexEla:
   81|   138k|CONSTEXPR_F int year_index(year_t y, month_t m) noexcept {
   82|   138k|  const int yi = static_cast<int>((y + (m > 2)) % 400);
   83|   138k|  return yi < 0 ? yi + 400 : yi;
  ------------------
  |  Branch (83:10): [True: 9.50k, False: 128k]
  ------------------
   84|   138k|}
_ZN4cctz6detail4impl16days_per_centuryEi:
   85|   320k|CONSTEXPR_F int days_per_century(int yi) noexcept {
   86|   320k|  return 36524 + (yi == 0 || yi > 300);
  ------------------
  |  Branch (86:19): [True: 389, False: 320k]
  |  Branch (86:30): [True: 135k, False: 184k]
  ------------------
   87|   320k|}
_ZN4cctz6detail4impl15days_per_4yearsEi:
   88|  1.84M|CONSTEXPR_F int days_per_4years(int yi) noexcept {
   89|  1.84M|  return 1460 + (yi == 0 || yi > 300 || (yi - 1) % 100 < 96);
  ------------------
  |  Branch (89:18): [True: 1.07k, False: 1.84M]
  |  Branch (89:29): [True: 643k, False: 1.20M]
  |  Branch (89:41): [True: 1.14M, False: 60.9k]
  ------------------
   90|  1.84M|}
_ZN4cctz6detail4impl14days_per_monthEla:
  106|  1.05M|CONSTEXPR_F int days_per_month(year_t y, month_t m) noexcept {
  107|  1.05M|  CONSTEXPR_D int k_days_per_month[1 + 12] = {
  ------------------
  |  |   25|  1.05M|#define CONSTEXPR_D constexpr  // data
  ------------------
  108|  1.05M|      -1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31  // non leap year
  109|  1.05M|  };
  110|  1.05M|  return k_days_per_month[m] + (m == 2 && is_leap_year(y));
  ------------------
  |  Branch (110:33): [True: 135k, False: 921k]
  |  Branch (110:43): [True: 32.1k, False: 103k]
  ------------------
  111|  1.05M|}
_ZN4cctz6detail4impl6n_hourElllllaa:
  192|   286k|                          diff_t hh, minute_t mm, second_t ss) noexcept {
  193|   286k|  cd += hh / 24;
  194|   286k|  hh %= 24;
  195|   286k|  if (hh < 0) {
  ------------------
  |  Branch (195:7): [True: 5.20k, False: 281k]
  ------------------
  196|  5.20k|    cd -= 1;
  197|  5.20k|    hh += 24;
  198|  5.20k|  }
  199|   286k|  return n_mon(y, m, d, cd, static_cast<hour_t>(hh), mm, ss);
  200|   286k|}
_ZN4cctz6detail4impl5n_minElllllla:
  202|   286k|                         diff_t mm, second_t ss) noexcept {
  203|   286k|  ch += mm / 60;
  204|   286k|  mm %= 60;
  205|   286k|  if (mm < 0) {
  ------------------
  |  Branch (205:7): [True: 62.6k, False: 223k]
  ------------------
  206|  62.6k|    ch -= 1;
  207|  62.6k|    mm += 60;
  208|  62.6k|  }
  209|   286k|  return n_hour(y, m, d, hh / 24 + ch / 24, hh % 24 + ch % 24,
  210|   286k|                static_cast<minute_t>(mm), ss);
  211|   286k|}
_ZN4cctz6detail10civil_timeINS0_10second_tagEEC2ENS0_6fieldsE:
  446|   348k|  explicit CONSTEXPR_M civil_time(fields f) noexcept : f_(align(T{}, f)) {}
_ZN4cctz6detail5alignENS0_10second_tagENS0_6fieldsE:
  332|   348k|CONSTEXPR_F fields align(second_tag, fields f) noexcept {
  333|   348k|  return f;
  334|   348k|}
_ZNK4cctz6detail10civil_timeINS0_10second_tagEE4yearEv:
  392|   545k|  CONSTEXPR_M year_t year() const noexcept { return f_.y; }
_ZNK4cctz6detail10civil_timeINS0_10second_tagEE5monthEv:
  393|   138k|  CONSTEXPR_M int month() const noexcept { return f_.m; }
_ZNK4cctz6detail10civil_timeINS0_10second_tagEE3dayEv:
  394|  44.8k|  CONSTEXPR_M int day() const noexcept { return f_.d; }
_ZN4cctz6detailplENS0_10civil_timeINS0_7day_tagEEEl:
  424|    564|  friend CONSTEXPR_F civil_time operator+(civil_time a, diff_t n) noexcept {
  425|    564|    return civil_time(step(T{}, a.f_, n));
  426|    564|  }
_ZN4cctz6detailmiENS0_10civil_timeINS0_7day_tagEEEl:
  430|  4.95k|  friend CONSTEXPR_F civil_time operator-(civil_time a, diff_t n) noexcept {
  431|  4.95k|    return n != (std::numeric_limits<diff_t>::min)()
  ------------------
  |  Branch (431:12): [True: 4.95k, False: 0]
  ------------------
  432|  4.95k|               ? civil_time(step(T{}, a.f_, -n))
  433|  4.95k|               : civil_time(step(T{}, step(T{}, a.f_, -(n + 1)), 1));
  434|  4.95k|  }
_ZN4cctz6detail4stepENS0_10second_tagENS0_6fieldsEl:
  247|   324k|CONSTEXPR_F fields step(second_tag, fields f, diff_t n) noexcept {
  248|   324k|  return impl::n_sec(f.y, f.m, f.d, f.hh, f.mm + n / 60, f.ss + n % 60);
  249|   324k|}
_ZN4cctz6detail4stepENS0_7day_tagENS0_6fieldsEl:
  256|  5.52k|CONSTEXPR_F fields step(day_tag, fields f, diff_t n) noexcept {
  257|  5.52k|  return impl::n_day(f.y, f.m, f.d, n, f.hh, f.mm, f.ss);
  258|  5.52k|}
_ZN4cctz6detail4impl9scale_addElll:
  271|  39.1k|CONSTEXPR_F diff_t scale_add(diff_t v, diff_t f, diff_t a) noexcept {
  272|  39.1k|  return (v < 0) ? ((v + 1) * f + a) - f : ((v - 1) * f + a) + f;
  ------------------
  |  Branch (272:10): [True: 6.26k, False: 32.8k]
  ------------------
  273|  39.1k|}
_ZN4cctz6detail4impl7ymd_ordElaa:
  277|  34.8k|CONSTEXPR_F diff_t ymd_ord(year_t y, month_t m, day_t d) noexcept {
  278|  34.8k|  const diff_t eyear = (m <= 2) ? y - 1 : y;
  ------------------
  |  Branch (278:24): [True: 9.95k, False: 24.9k]
  ------------------
  279|  34.8k|  const diff_t era = (eyear >= 0 ? eyear : eyear - 399) / 400;
  ------------------
  |  Branch (279:23): [True: 22.0k, False: 12.8k]
  ------------------
  280|  34.8k|  const diff_t yoe = eyear - era * 400;
  281|  34.8k|  const diff_t doy = (153 * (m + (m > 2 ? -3 : 9)) + 2) / 5 + d - 1;
  ------------------
  |  Branch (281:35): [True: 24.9k, False: 9.95k]
  ------------------
  282|  34.8k|  const diff_t doe = yoe * 365 + yoe / 4 - yoe / 100 + doy;
  283|  34.8k|  return era * 146097 + doe - 719468;
  284|  34.8k|}
_ZN4cctz6detail4impl14day_differenceElaalaa:
  292|  17.4k|                                  year_t y2, month_t m2, day_t d2) noexcept {
  293|  17.4k|  const diff_t a_c4_off = y1 % 400;
  294|  17.4k|  const diff_t b_c4_off = y2 % 400;
  295|  17.4k|  diff_t c4_diff = (y1 - a_c4_off) - (y2 - b_c4_off);
  296|  17.4k|  diff_t delta = ymd_ord(a_c4_off, m1, d1) - ymd_ord(b_c4_off, m2, d2);
  297|  17.4k|  if (c4_diff > 0 && delta < 0) {
  ------------------
  |  Branch (297:7): [True: 7.90k, False: 9.52k]
  |  Branch (297:22): [True: 528, False: 7.37k]
  ------------------
  298|    528|    delta += 2 * 146097;
  299|    528|    c4_diff -= 2 * 400;
  300|  16.9k|  } else if (c4_diff < 0 && delta > 0) {
  ------------------
  |  Branch (300:14): [True: 2.03k, False: 14.8k]
  |  Branch (300:29): [True: 12, False: 2.02k]
  ------------------
  301|     12|    delta -= 2 * 146097;
  302|     12|    c4_diff += 2 * 400;
  303|     12|  }
  304|  17.4k|  return (c4_diff / 400 * 146097) + delta;
  305|  17.4k|}
_ZN4cctz6detail10differenceENS0_7day_tagENS0_6fieldsES2_:
  316|  17.4k|CONSTEXPR_F diff_t difference(day_tag, fields f1, fields f2) noexcept {
  317|  17.4k|  return impl::day_difference(f1.y, f1.m, f1.d, f2.y, f2.m, f2.d);
  318|  17.4k|}
_ZN4cctz6detail10differenceENS0_8hour_tagENS0_6fieldsES2_:
  319|  13.0k|CONSTEXPR_F diff_t difference(hour_tag, fields f1, fields f2) noexcept {
  320|  13.0k|  return impl::scale_add(difference(day_tag{}, f1, f2), 24, (f1.hh - f2.hh));
  321|  13.0k|}
_ZN4cctz6detail10differenceENS0_10minute_tagENS0_6fieldsES2_:
  322|  13.0k|CONSTEXPR_F diff_t difference(minute_tag, fields f1, fields f2) noexcept {
  323|  13.0k|  return impl::scale_add(difference(hour_tag{}, f1, f2), 60, (f1.mm - f2.mm));
  324|  13.0k|}
_ZN4cctz6detail10differenceENS0_10second_tagENS0_6fieldsES2_:
  325|  13.0k|CONSTEXPR_F diff_t difference(second_tag, fields f1, fields f2) noexcept {
  326|  13.0k|  return impl::scale_add(difference(minute_tag{}, f1, f2), 60, f1.ss - f2.ss);
  327|  13.0k|}
_ZN4cctz6detail5alignENS0_7day_tagENS0_6fieldsE:
  341|  18.9k|CONSTEXPR_F fields align(day_tag, fields f) noexcept {
  342|  18.9k|  return fields{f.y, f.m, f.d, 0, 0, 0};
  343|  18.9k|}
_ZN4cctz6detail5alignENS0_8year_tagENS0_6fieldsE:
  347|  4.67k|CONSTEXPR_F fields align(year_tag, fields f) noexcept {
  348|  4.67k|  return fields{f.y, 1, 1, 0, 0, 0};
  349|  4.67k|}
_ZN4cctz6detail11get_weekdayERKNS0_10civil_timeINS0_10second_tagEEE:
  522|  13.5k|CONSTEXPR_F weekday get_weekday(const civil_second& cs) noexcept {
  523|  13.5k|  CONSTEXPR_D weekday k_weekday_by_mon_off[13] = {
  ------------------
  |  |   25|  13.5k|#define CONSTEXPR_D constexpr  // data
  ------------------
  524|  13.5k|      weekday::monday,    weekday::tuesday,  weekday::wednesday,
  525|  13.5k|      weekday::thursday,  weekday::friday,   weekday::saturday,
  526|  13.5k|      weekday::sunday,    weekday::monday,   weekday::tuesday,
  527|  13.5k|      weekday::wednesday, weekday::thursday, weekday::friday,
  528|  13.5k|      weekday::saturday,
  529|  13.5k|  };
  530|  13.5k|  CONSTEXPR_D int k_weekday_offsets[1 + 12] = {
  ------------------
  |  |   25|  13.5k|#define CONSTEXPR_D constexpr  // data
  ------------------
  531|  13.5k|      -1, 0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4,
  532|  13.5k|  };
  533|  13.5k|  year_t wd = 2400 + (cs.year() % 400) - (cs.month() < 3);
  534|  13.5k|  wd += wd / 4 - wd / 100 + wd / 400;
  535|  13.5k|  wd += k_weekday_offsets[cs.month()] + cs.day();
  536|  13.5k|  return k_weekday_by_mon_off[wd % 7 + 6];
  537|  13.5k|}
_ZN4cctz6detail12next_weekdayENS0_10civil_timeINS0_7day_tagEEENS0_7weekdayE:
  541|    282|CONSTEXPR_F civil_day next_weekday(civil_day cd, weekday wd) noexcept {
  542|    282|  CONSTEXPR_D weekday k_weekdays_forw[14] = {
  ------------------
  |  |   25|    282|#define CONSTEXPR_D constexpr  // data
  ------------------
  543|    282|      weekday::monday,    weekday::tuesday,  weekday::wednesday,
  544|    282|      weekday::thursday,  weekday::friday,   weekday::saturday,
  545|    282|      weekday::sunday,    weekday::monday,   weekday::tuesday,
  546|    282|      weekday::wednesday, weekday::thursday, weekday::friday,
  547|    282|      weekday::saturday,  weekday::sunday,
  548|    282|  };
  549|    282|  weekday base = get_weekday(cd);
  550|  1.78k|  for (int i = 0;; ++i) {
  551|  1.78k|    if (base == k_weekdays_forw[i]) {
  ------------------
  |  Branch (551:9): [True: 282, False: 1.49k]
  ------------------
  552|  1.28k|      for (int j = i + 1;; ++j) {
  553|  1.28k|        if (wd == k_weekdays_forw[j]) {
  ------------------
  |  Branch (553:13): [True: 282, False: 999]
  ------------------
  554|    282|          return cd + (j - i);
  555|    282|        }
  556|  1.28k|      }
  557|    282|    }
  558|  1.78k|  }
  559|    282|}
_ZN4cctz6detail12prev_weekdayENS0_10civil_timeINS0_7day_tagEEENS0_7weekdayE:
  561|  4.67k|CONSTEXPR_F civil_day prev_weekday(civil_day cd, weekday wd) noexcept {
  562|  4.67k|  CONSTEXPR_D weekday k_weekdays_back[14] = {
  ------------------
  |  |   25|  4.67k|#define CONSTEXPR_D constexpr  // data
  ------------------
  563|  4.67k|      weekday::sunday,   weekday::saturday,  weekday::friday,
  564|  4.67k|      weekday::thursday, weekday::wednesday, weekday::tuesday,
  565|  4.67k|      weekday::monday,   weekday::sunday,    weekday::saturday,
  566|  4.67k|      weekday::friday,   weekday::thursday,  weekday::wednesday,
  567|  4.67k|      weekday::tuesday,  weekday::monday,
  568|  4.67k|  };
  569|  4.67k|  weekday base = get_weekday(cd);
  570|  19.9k|  for (int i = 0;; ++i) {
  571|  19.9k|    if (base == k_weekdays_back[i]) {
  ------------------
  |  Branch (571:9): [True: 4.67k, False: 15.2k]
  ------------------
  572|  18.9k|      for (int j = i + 1;; ++j) {
  573|  18.9k|        if (wd == k_weekdays_back[j]) {
  ------------------
  |  Branch (573:13): [True: 4.67k, False: 14.2k]
  ------------------
  574|  4.67k|          return cd - (j - i);
  575|  4.67k|        }
  576|  18.9k|      }
  577|  4.67k|    }
  578|  19.9k|  }
  579|  4.67k|}
_ZN4cctz6detail11get_yeardayERKNS0_10civil_timeINS0_10second_tagEEE:
  581|  8.48k|CONSTEXPR_F int get_yearday(const civil_second& cs) noexcept {
  582|  8.48k|  CONSTEXPR_D int k_month_offsets[1 + 12] = {
  ------------------
  |  |   25|  8.48k|#define CONSTEXPR_D constexpr  // data
  ------------------
  583|  8.48k|      -1, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334,
  584|  8.48k|  };
  585|  8.48k|  const int feb29 = (cs.month() > 2 && impl::is_leap_year(cs.year()));
  ------------------
  |  Branch (585:22): [True: 7.98k, False: 497]
  |  Branch (585:40): [True: 640, False: 7.34k]
  ------------------
  586|  8.48k|  return k_month_offsets[cs.month()] + feb29 + cs.day();
  587|  8.48k|}
_ZNK4cctz6detail10civil_timeINS0_7day_tagEE4yearEv:
  392|  4.67k|  CONSTEXPR_M year_t year() const noexcept { return f_.y; }
_ZNK4cctz6detail10civil_timeINS0_7day_tagEE5monthEv:
  393|  4.67k|  CONSTEXPR_M int month() const noexcept { return f_.m; }
_ZNK4cctz6detail10civil_timeINS0_7day_tagEE3dayEv:
  394|  4.67k|  CONSTEXPR_M int day() const noexcept { return f_.d; }
_ZN4cctz6detail10civil_timeINS0_7day_tagEEC2Ellllll:
  359|  4.39k|      : civil_time(impl::n_sec(y, m, d, hh, mm, ss)) {}
_ZN4cctz6detail10civil_timeINS0_7day_tagEEC2ENS0_6fieldsE:
  446|  18.9k|  explicit CONSTEXPR_M civil_time(fields f) noexcept : f_(align(T{}, f)) {}
_ZN4cctz6detailmiENS0_10civil_timeINS0_7day_tagEEES3_:
  435|  4.39k|  friend CONSTEXPR_F diff_t operator-(civil_time lhs, civil_time rhs) noexcept {
  436|  4.39k|    return difference(T{}, lhs.f_, rhs.f_);
  437|  4.39k|  }
_ZN4cctz6detail10civil_timeINS0_10second_tagEEC2INS0_7day_tagEEERKNS1_IT_EEPNSt3__19enable_ifIXsr3std10is_base_ofIS2_S6_EE5valueEvE4typeE:
  375|  4.95k|      : civil_time(ct.f_) {}
_ZN4cctz6detail10civil_timeINS0_8year_tagEEC2INS0_7day_tagEEERKNS1_IT_EEPNSt3__19enable_ifIXsr3std10is_base_ofIS6_S2_EE5valueEvE4typeE:
  379|  4.39k|      : civil_time(ct.f_) {}
_ZN4cctz6detail10civil_timeINS0_8year_tagEEC2ENS0_6fieldsE:
  446|  4.67k|  explicit CONSTEXPR_M civil_time(fields f) noexcept : f_(align(T{}, f)) {}
_ZN4cctz6detail10civil_timeINS0_7day_tagEEC2INS0_8year_tagEEERKNS1_IT_EEPNSt3__19enable_ifIXsr3std10is_base_ofIS2_S6_EE5valueEvE4typeE:
  375|  4.67k|      : civil_time(ct.f_) {}
_ZN4cctz6detail10civil_timeINS0_7day_tagEEC2INS0_10second_tagEEERKNS1_IT_EEPNSt3__19enable_ifIXsr3std10is_base_ofIS6_S2_EE5valueEvE4typeE:
  379|  4.39k|      : civil_time(ct.f_) {}
_ZNK4cctz6detail10civil_timeINS0_10second_tagEE4hourEv:
  395|  14.8k|  CONSTEXPR_M int hour() const noexcept { return f_.hh; }
_ZNK4cctz6detail10civil_timeINS0_10second_tagEE6minuteEv:
  396|  14.6k|  CONSTEXPR_M int minute() const noexcept { return f_.mm; }
_ZNK4cctz6detail10civil_timeINS0_10second_tagEE6secondEv:
  397|  78.6k|  CONSTEXPR_M int second() const noexcept { return f_.ss; }
_ZN4cctz6detail10civil_timeINS0_8year_tagEEC2Ellllll:
  359|    282|      : civil_time(impl::n_sec(y, m, d, hh, mm, ss)) {}
_ZNK4cctz6detail10civil_timeINS0_8year_tagEE4yearEv:
  392|    282|  CONSTEXPR_M year_t year() const noexcept { return f_.y; }
_ZN4cctz6detailgtINS0_10second_tagES2_EEbRKNS0_10civil_timeIT_EERKNS3_IT0_EE:
  494|  6.21k|                           const civil_time<T2>& rhs) noexcept {
  495|  6.21k|  return rhs < lhs;
  496|  6.21k|}
_ZN4cctz6detailplENS0_10civil_timeINS0_10second_tagEEEl:
  424|   256k|  friend CONSTEXPR_F civil_time operator+(civil_time a, diff_t n) noexcept {
  425|   256k|    return civil_time(step(T{}, a.f_, n));
  426|   256k|  }
_ZN4cctz6detail10civil_timeINS0_10second_tagEE3maxEv:
  382|    329|  static CONSTEXPR_F auto (max)() -> civil_time {
  383|    329|    const auto max_year = (std::numeric_limits<std::int_least64_t>::max)();
  384|    329|    return civil_time(max_year, 12, 31, 23, 59, 59);
  385|    329|  }
_ZN4cctz6detailltINS0_10second_tagES2_EEbRKNS0_10civil_timeIT_EERKNS3_IT0_EE:
  469|   159k|                           const civil_time<T2>& rhs) noexcept {
  470|   159k|  return (lhs.year() < rhs.year() ||
  ------------------
  |  Branch (470:11): [True: 76.4k, False: 82.9k]
  ------------------
  471|  82.9k|          (lhs.year() == rhs.year() &&
  ------------------
  |  Branch (471:12): [True: 34.9k, False: 47.9k]
  ------------------
  472|  34.9k|           (lhs.month() < rhs.month() ||
  ------------------
  |  Branch (472:13): [True: 31.6k, False: 3.29k]
  ------------------
  473|  3.29k|            (lhs.month() == rhs.month() &&
  ------------------
  |  Branch (473:14): [True: 1.08k, False: 2.20k]
  ------------------
  474|  1.08k|             (lhs.day() < rhs.day() ||
  ------------------
  |  Branch (474:15): [True: 233, False: 855]
  ------------------
  475|    855|              (lhs.day() == rhs.day() &&
  ------------------
  |  Branch (475:16): [True: 563, False: 292]
  ------------------
  476|    563|               (lhs.hour() < rhs.hour() ||
  ------------------
  |  Branch (476:17): [True: 87, False: 476]
  ------------------
  477|    476|                (lhs.hour() == rhs.hour() &&
  ------------------
  |  Branch (477:18): [True: 351, False: 125]
  ------------------
  478|    351|                 (lhs.minute() < rhs.minute() ||
  ------------------
  |  Branch (478:19): [True: 54, False: 297]
  ------------------
  479|    297|                  (lhs.minute() == rhs.minute() &&
  ------------------
  |  Branch (479:20): [True: 130, False: 167]
  ------------------
  480|    130|                   (lhs.second() < rhs.second())))))))))));
  ------------------
  |  Branch (480:20): [True: 34, False: 96]
  ------------------
  481|   159k|}
_ZN4cctz6detail10civil_timeINS0_10second_tagEE3minEv:
  386|    265|  static CONSTEXPR_F auto (min)() -> civil_time {
  387|    265|    const auto min_year = (std::numeric_limits<std::int_least64_t>::min)();
  388|    265|    return civil_time(min_year, 1, 1, 0, 0, 0);
  389|    265|  }
_ZN4cctz6detail10civil_timeINS0_10second_tagEEmIEl:
  403|  5.38k|  CONSTEXPR_M civil_time& operator-=(diff_t n) noexcept {
  404|  5.38k|    return *this = *this - n;
  405|  5.38k|  }
_ZN4cctz6detailmiENS0_10civil_timeINS0_10second_tagEEEl:
  430|  68.1k|  friend CONSTEXPR_F civil_time operator-(civil_time a, diff_t n) noexcept {
  431|  68.1k|    return n != (std::numeric_limits<diff_t>::min)()
  ------------------
  |  Branch (431:12): [True: 68.1k, False: 0]
  ------------------
  432|  68.1k|               ? civil_time(step(T{}, a.f_, -n))
  433|  68.1k|               : civil_time(step(T{}, step(T{}, a.f_, -(n + 1)), 1));
  434|  68.1k|  }
_ZN4cctz6detailmiENS0_10civil_timeINS0_10second_tagEEES3_:
  435|  13.0k|  friend CONSTEXPR_F diff_t operator-(civil_time lhs, civil_time rhs) noexcept {
  436|  13.0k|    return difference(T{}, lhs.f_, rhs.f_);
  437|  13.0k|  }
_ZN4cctz6detail10civil_timeINS0_10second_tagEEC2Ev:
  361|   161k|  CONSTEXPR_M civil_time() noexcept : f_{1970, 1, 1, 0, 0, 0} {}
_ZN4cctz6detailgeINS0_10second_tagES2_EEbRKNS0_10civil_timeIT_EERKNS3_IT0_EE:
  489|  13.3k|                            const civil_time<T2>& rhs) noexcept {
  490|  13.3k|  return !(lhs < rhs);
  491|  13.3k|}
_ZN4cctz6detailleINS0_10second_tagES2_EEbRKNS0_10civil_timeIT_EERKNS3_IT0_EE:
  484|  17.6k|                            const civil_time<T2>& rhs) noexcept {
  485|  17.6k|  return !(rhs < lhs);
  486|  17.6k|}

_ZN4cctz9time_zoneC2Ev:
   67|  8.99k|  time_zone() : time_zone(nullptr) {}  // Equivalent to UTC
_ZN4cctz9time_zoneC2EPKNS0_4ImplE:
  219|  18.1k|  explicit time_zone(const Impl* impl) : impl_(impl) {}
_ZN4cctz7convertERKNS_6detail10civil_timeINS0_10second_tagEEERKNS_9time_zoneE:
  256|  8.48k|                                   const time_zone& tz) {
  257|  8.48k|  const time_zone::civil_lookup cl = tz.lookup(cs);
  258|  8.48k|  if (cl.kind == time_zone::civil_lookup::SKIPPED) return cl.trans;
  ------------------
  |  Branch (258:7): [True: 10, False: 8.47k]
  ------------------
  259|  8.47k|  return cl.pre;
  260|  8.48k|}
_ZN4cctz5parseINSt3__16chrono8durationIxNS1_5ratioILl1ELl1000000EEEEEEEbRKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEESE_RKNS_9time_zoneEPNS2_10time_pointINS2_12system_clockET_EE:
  369|  8.48k|                  const time_zone& tz, time_point<D>* tpp) {
  370|  8.48k|  time_point<seconds> sec;
  371|  8.48k|  detail::femtoseconds fs;
  372|  8.48k|  return detail::parse(fmt, input, tz, &sec, &fs) &&
  ------------------
  |  Branch (372:10): [True: 5.25k, False: 3.23k]
  ------------------
  373|  5.25k|         detail::join_seconds(sec, fs, tpp);
  ------------------
  |  Branch (373:10): [True: 5.25k, False: 0]
  ------------------
  374|  8.48k|}
_ZN4cctz6detail12join_secondsIxLl1000000EEEbRKNSt3__16chrono10time_pointINS3_12system_clockENS3_8durationIlNS2_5ratioILl1ELl1EEEEEEERKNS6_IlNS7_ILl1ELl1000000000000000EEEEEPNS4_IS5_NS6_IT_NS7_ILl1EXT0_EEEEEEE:
  405|  5.25k|    time_point<std::chrono::duration<Rep, std::ratio<1, Denom>>>* tpp) {
  406|  5.25k|  using D = std::chrono::duration<Rep, std::ratio<1, Denom>>;
  407|       |  // TODO(#199): Return false if result unrepresentable as a time_point<D>.
  408|  5.25k|  *tpp = std::chrono::time_point_cast<D>(sec);
  409|  5.25k|  *tpp += std::chrono::duration_cast<D>(fs);
  410|  5.25k|  return true;
  411|  5.25k|}
_ZN4cctz6formatINSt3__16chrono8durationIlNS1_5ratioILl1ELl1EEEEEEENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKSC_RKNS2_10time_pointINS2_12system_clockET_EERKNS_9time_zoneE:
  315|  8.48k|                          const time_zone& tz) {
  316|  8.48k|  const auto p = detail::split_seconds(tp);
  317|  8.48k|  const auto n = std::chrono::duration_cast<detail::femtoseconds>(p.second);
  318|  8.48k|  return detail::format(fmt, p.first, n, tz);
  319|  8.48k|}
_ZN4cctz6detail13split_secondsERKNSt3__16chrono10time_pointINS2_12system_clockENS2_8durationIlNS1_5ratioILl1ELl1EEEEEEE:
  395|  8.48k|    const time_point<seconds>& tp) {
  396|  8.48k|  return {tp, seconds::zero()};
  397|  8.48k|}

_ZN4cctz19FixedOffsetFromNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPNS0_6chrono8durationIlNS0_5ratioILl1ELl1EEEEE:
   50|  9.94k|bool FixedOffsetFromName(const std::string& name, seconds* offset) {
   51|  9.94k|  if (name == "UTC" || name == "UTC0") {
  ------------------
  |  Branch (51:7): [True: 1.48k, False: 8.46k]
  |  Branch (51:24): [True: 2, False: 8.46k]
  ------------------
   52|  1.48k|    *offset = seconds::zero();
   53|  1.48k|    return true;
   54|  1.48k|  }
   55|       |
   56|  8.46k|  const std::size_t prefix_len = sizeof(kFixedZonePrefix) - 1;
   57|  8.46k|  const char* const ep = kFixedZonePrefix + prefix_len;
   58|  8.46k|  if (name.size() != prefix_len + 9)  // <prefix>+99:99:99
  ------------------
  |  Branch (58:7): [True: 7.62k, False: 836]
  ------------------
   59|  7.62k|    return false;
   60|    836|  if (!std::equal(kFixedZonePrefix, ep, name.begin()))
  ------------------
  |  Branch (60:7): [True: 51, False: 785]
  ------------------
   61|     51|    return false;
   62|    785|  const char* np = name.data() + prefix_len;
   63|    785|  if (np[0] != '+' && np[0] != '-')
  ------------------
  |  Branch (63:7): [True: 420, False: 365]
  |  Branch (63:23): [True: 26, False: 394]
  ------------------
   64|     26|    return false;
   65|    759|  if (np[3] != ':' || np[6] != ':')  // see note below about large offsets
  ------------------
  |  Branch (65:7): [True: 14, False: 745]
  |  Branch (65:23): [True: 22, False: 723]
  ------------------
   66|     36|    return false;
   67|       |
   68|    723|  int hours = Parse02d(np + 1);
   69|    723|  if (hours == -1) return false;
  ------------------
  |  Branch (69:7): [True: 6, False: 717]
  ------------------
   70|    717|  int mins = Parse02d(np + 4);
   71|    717|  if (mins == -1) return false;
  ------------------
  |  Branch (71:7): [True: 4, False: 713]
  ------------------
   72|    713|  int secs = Parse02d(np + 7);
   73|    713|  if (secs == -1) return false;
  ------------------
  |  Branch (73:7): [True: 2, False: 711]
  ------------------
   74|       |
   75|    711|  secs += ((hours * 60) + mins) * 60;
   76|    711|  if (secs > 24 * 60 * 60) return false;  // outside supported offset range
  ------------------
  |  Branch (76:7): [True: 6, False: 705]
  ------------------
   77|    705|  *offset = seconds(secs * (np[0] == '-' ? -1 : 1));  // "-" means west
  ------------------
  |  Branch (77:29): [True: 370, False: 335]
  ------------------
   78|    705|  return true;
   79|    711|}
_ZN4cctz17FixedOffsetToNameERKNSt3__16chrono8durationIlNS0_5ratioILl1ELl1EEEEE:
   81|    319|std::string FixedOffsetToName(const seconds& offset) {
   82|    319|  if (offset == seconds::zero()) return "UTC";
  ------------------
  |  Branch (82:7): [True: 1, False: 318]
  ------------------
   83|    318|  if (offset < std::chrono::hours(-24) || offset > std::chrono::hours(24)) {
  ------------------
  |  Branch (83:7): [True: 0, False: 318]
  |  Branch (83:7): [True: 0, False: 318]
  |  Branch (83:43): [True: 0, False: 318]
  ------------------
   84|       |    // We don't support fixed-offset zones more than 24 hours
   85|       |    // away from UTC to avoid complications in rendering such
   86|       |    // offsets and to (somewhat) limit the total number of zones.
   87|      0|    return "UTC";
   88|      0|  }
   89|    318|  int offset_seconds = static_cast<int>(offset.count());
   90|    318|  const char sign = (offset_seconds < 0 ? '-' : '+');
  ------------------
  |  Branch (90:22): [True: 170, False: 148]
  ------------------
   91|    318|  int offset_minutes = offset_seconds / 60;
   92|    318|  offset_seconds %= 60;
   93|    318|  if (sign == '-') {
  ------------------
  |  Branch (93:7): [True: 170, False: 148]
  ------------------
   94|    170|    if (offset_seconds > 0) {
  ------------------
  |  Branch (94:9): [True: 0, False: 170]
  ------------------
   95|      0|      offset_seconds -= 60;
   96|      0|      offset_minutes += 1;
   97|      0|    }
   98|    170|    offset_seconds = -offset_seconds;
   99|    170|    offset_minutes = -offset_minutes;
  100|    170|  }
  101|    318|  int offset_hours = offset_minutes / 60;
  102|    318|  offset_minutes %= 60;
  103|    318|  const std::size_t prefix_len = sizeof(kFixedZonePrefix) - 1;
  104|    318|  char buf[prefix_len + sizeof("-24:00:00")];
  105|    318|  char* ep = std::copy_n(kFixedZonePrefix, prefix_len, buf);
  106|    318|  *ep++ = sign;
  107|    318|  ep = Format02d(ep, offset_hours);
  108|    318|  *ep++ = ':';
  109|    318|  ep = Format02d(ep, offset_minutes);
  110|    318|  *ep++ = ':';
  111|    318|  ep = Format02d(ep, offset_seconds);
  112|    318|  *ep++ = '\0';
  113|    318|  assert(ep == buf + sizeof(buf));
  ------------------
  |  Branch (113:3): [True: 318, False: 0]
  ------------------
  114|    318|  return buf;
  115|    318|}
_ZN4cctz17FixedOffsetToAbbrERKNSt3__16chrono8durationIlNS0_5ratioILl1ELl1EEEEE:
  117|    319|std::string FixedOffsetToAbbr(const seconds& offset) {
  118|    319|  std::string abbr = FixedOffsetToName(offset);
  119|    319|  const std::size_t prefix_len = sizeof(kFixedZonePrefix) - 1;
  120|    319|  if (abbr.size() == prefix_len + 9) {         // <prefix>+99:99:99
  ------------------
  |  Branch (120:7): [True: 318, False: 1]
  ------------------
  121|    318|    abbr.erase(0, prefix_len);                 // +99:99:99
  122|    318|    abbr.erase(6, 1);                          // +99:9999
  123|    318|    abbr.erase(3, 1);                          // +999999
  124|    318|    if (abbr[5] == '0' && abbr[6] == '0') {    // +999900
  ------------------
  |  Branch (124:9): [True: 119, False: 199]
  |  Branch (124:27): [True: 57, False: 62]
  ------------------
  125|     57|      abbr.erase(5, 2);                        // +9999
  126|     57|      if (abbr[3] == '0' && abbr[4] == '0') {  // +9900
  ------------------
  |  Branch (126:11): [True: 20, False: 37]
  |  Branch (126:29): [True: 6, False: 14]
  ------------------
  127|      6|        abbr.erase(3, 2);                      // +99
  128|      6|      }
  129|     57|    }
  130|    318|  }
  131|    319|  return abbr;
  132|    319|}
time_zone_fixed.cc:_ZN4cctz12_GLOBAL__N_18Parse02dEPKc:
   38|  2.15k|int Parse02d(const char* p) {
   39|  2.15k|  if (const char* ap = std::strchr(kDigits, *p)) {
  ------------------
  |  Branch (39:19): [True: 2.14k, False: 6]
  ------------------
   40|  2.14k|    int v = static_cast<int>(ap - kDigits);
   41|  2.14k|    if (const char* bp = std::strchr(kDigits, *++p)) {
  ------------------
  |  Branch (41:21): [True: 2.14k, False: 6]
  ------------------
   42|  2.14k|      return (v * 10) + static_cast<int>(bp - kDigits);
   43|  2.14k|    }
   44|  2.14k|  }
   45|     12|  return -1;
   46|  2.15k|}
time_zone_fixed.cc:_ZN4cctz12_GLOBAL__N_19Format02dEPci:
   32|    954|char* Format02d(char* p, int v) {
   33|    954|  *p++ = kDigits[(v / 10) % 10];
   34|    954|  *p++ = kDigits[v % 10];
   35|    954|  return p;
   36|    954|}

_ZN4cctz6detail6formatERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_6chrono10time_pointINSA_12system_clockENSA_8durationIlNS1_5ratioILl1ELl1EEEEEEERKNSD_IlNSE_ILl1ELl1000000000000000EEEEERKNS_9time_zoneE:
  328|  8.48k|                   const detail::femtoseconds& fs, const time_zone& tz) {
  329|  8.48k|  std::string result;
  330|  8.48k|  result.reserve(2 * format.size());  // A guess for the result size.
  331|  8.48k|  const time_zone::absolute_lookup al = tz.lookup(tp);
  332|  8.48k|  const std::tm tm = ToTM(al);
  333|       |
  334|       |  // Scratch buffer for internal conversions.
  335|  8.48k|  char buf[6 + (kDigits10_64 + 2)];  // enough for longest conversion (%F)
  336|  8.48k|  char* const ep = buf + sizeof(buf);
  337|  8.48k|  char* bp;  // works back from ep
  338|       |
  339|       |  // Maintain three, disjoint subsequences that span format.
  340|       |  //   [format.begin() ... pending) : already formatted into result
  341|       |  //   [pending ... cur) : formatting pending, but no special cases
  342|       |  //   [cur ... format.end()) : unexamined
  343|       |  // Initially, everything is in the unexamined part.
  344|  8.48k|  const char* pending = format.data();
  345|  8.48k|  const char* cur = pending;
  346|  8.48k|  const char* const end = pending + format.size();
  347|       |
  348|   192k|  while (cur != end) {  // while something is unexamined
  ------------------
  |  Branch (348:10): [True: 183k, False: 8.48k]
  ------------------
  349|       |    // Moves cur to the next percent sign.
  350|   183k|    const char* start = cur;
  351|  31.1M|    while (cur != end && *cur != '%') {
  ------------------
  |  Branch (351:12): [True: 31.1M, False: 750]
  |  Branch (351:26): [True: 31.0M, False: 182k]
  ------------------
  352|  31.0M|      if (*cur == '\0' && pending != start) {
  ------------------
  |  Branch (352:11): [True: 581k, False: 30.4M]
  |  Branch (352:27): [True: 8.02k, False: 573k]
  ------------------
  353|  8.02k|        FormatTM(&result, std::string(pending, cur), tm);
  354|  8.02k|        pending = start = cur;
  355|  8.02k|      }
  356|  31.0M|      ++cur;
  357|  31.0M|    }
  358|       |
  359|       |    // If the new pending text is all ordinary, copy it out.
  360|   183k|    if (cur != start && pending == start) {
  ------------------
  |  Branch (360:9): [True: 80.7k, False: 102k]
  |  Branch (360:25): [True: 22.0k, False: 58.6k]
  ------------------
  361|  22.0k|      result.append(pending, cur);
  362|  22.0k|      pending = start = cur;
  363|  22.0k|    }
  364|       |
  365|       |    // Span the sequential percent signs.
  366|   183k|    const char* const percent = cur;
  367|   408k|    while (cur != end && *cur == '%') ++cur;
  ------------------
  |  Branch (367:12): [True: 407k, False: 875]
  |  Branch (367:26): [True: 224k, False: 182k]
  ------------------
  368|       |
  369|       |    // If the new pending text is all percents, copy out one
  370|       |    // percent for every matched pair, then skip those pairs.
  371|   183k|    if (cur != start && pending == start) {
  ------------------
  |  Branch (371:9): [True: 183k, False: 374]
  |  Branch (371:25): [True: 122k, False: 60.3k]
  ------------------
  372|   122k|      std::size_t escaped = static_cast<std::size_t>(cur - pending) / 2;
  373|   122k|      result.append(pending, escaped);
  374|   122k|      pending += escaped * 2;
  375|       |      // Also copy out a single trailing percent.
  376|   122k|      if (pending != cur && cur == end) {
  ------------------
  |  Branch (376:11): [True: 121k, False: 1.16k]
  |  Branch (376:29): [True: 79, False: 121k]
  ------------------
  377|     79|        result.push_back(*pending++);
  378|     79|      }
  379|   122k|    }
  380|       |
  381|       |    // Loop unless we have an unescaped percent.
  382|   183k|    if (cur == end || (cur - percent) % 2 == 0) continue;
  ------------------
  |  Branch (382:9): [True: 875, False: 182k]
  |  Branch (382:23): [True: 4.61k, False: 178k]
  ------------------
  383|       |
  384|       |    // Simple specifiers that we handle ourselves.
  385|   178k|    if (*cur == '\0' || strchr("YmdeFUuWwHMSTzZs%", *cur)) {
  ------------------
  |  Branch (385:9): [True: 1.77k, False: 176k]
  |  Branch (385:25): [True: 17.3k, False: 159k]
  ------------------
  386|  19.1k|      FormatTM(&result, std::string(pending, cur - 1), tm);
  387|  19.1k|      switch (*cur) {
  ------------------
  |  Branch (387:15): [True: 19.1k, False: 0]
  ------------------
  388|  1.77k|        case '\0':
  ------------------
  |  Branch (388:9): [True: 1.77k, False: 17.3k]
  ------------------
  389|       |          // Because we allow NULs in the format string, we must give
  390|       |          // some meaning to the "%\0" specifier.  We choose the common
  391|       |          // (but undefined) strftime() behavior of echoing unknown
  392|       |          // specifiers.
  393|  1.77k|          result.push_back('%');
  394|  1.77k|          result.push_back('\0');
  395|  1.77k|          break;
  396|    635|        case 'Y':
  ------------------
  |  Branch (396:9): [True: 635, False: 18.4k]
  ------------------
  397|       |          // This avoids the tm.tm_year overflow problem for %Y, however
  398|       |          // tm.tm_year will still be used by other specifiers like %D.
  399|    635|          bp = Format64(ep, 0, al.cs.year());
  400|    635|          result.append(bp, ep);
  401|    635|          break;
  402|    213|        case 'm':
  ------------------
  |  Branch (402:9): [True: 213, False: 18.9k]
  ------------------
  403|    213|          bp = Format02d(ep, al.cs.month());
  404|    213|          result.append(bp, ep);
  405|    213|          break;
  406|    346|        case 'd':
  ------------------
  |  Branch (406:9): [True: 346, False: 18.7k]
  ------------------
  407|  1.06k|        case 'e':
  ------------------
  |  Branch (407:9): [True: 720, False: 18.4k]
  ------------------
  408|  1.06k|          bp = Format02d(ep, al.cs.day());
  409|  1.06k|          if (*cur == 'e' && *bp == '0') *bp = ' ';  // for Windows
  ------------------
  |  Branch (409:15): [True: 720, False: 346]
  |  Branch (409:30): [True: 310, False: 410]
  ------------------
  410|  1.06k|          result.append(bp, ep);
  411|  1.06k|          break;
  412|    471|        case 'F':
  ------------------
  |  Branch (412:9): [True: 471, False: 18.6k]
  ------------------
  413|    471|          bp = Format02d(ep, al.cs.day());
  414|    471|          *--bp = '-';
  415|    471|          bp = Format02d(bp, al.cs.month());
  416|    471|          *--bp = '-';
  417|    471|          bp = Format64(bp, 0, al.cs.year());
  418|    471|          result.append(bp, ep);
  419|    471|          break;
  420|  1.71k|        case 'U':
  ------------------
  |  Branch (420:9): [True: 1.71k, False: 17.4k]
  ------------------
  421|  1.71k|          bp = Format02d(ep, ToWeek(civil_day(al.cs), weekday::sunday));
  422|  1.71k|          result.append(bp, ep);
  423|  1.71k|          break;
  424|    604|        case 'u':
  ------------------
  |  Branch (424:9): [True: 604, False: 18.5k]
  ------------------
  425|    604|          bp = Format64(ep, 0, tm.tm_wday ? tm.tm_wday : 7);
  ------------------
  |  Branch (425:32): [True: 409, False: 195]
  ------------------
  426|    604|          result.append(bp, ep);
  427|    604|          break;
  428|  2.67k|        case 'W':
  ------------------
  |  Branch (428:9): [True: 2.67k, False: 16.4k]
  ------------------
  429|  2.67k|          bp = Format02d(ep, ToWeek(civil_day(al.cs), weekday::monday));
  430|  2.67k|          result.append(bp, ep);
  431|  2.67k|          break;
  432|    198|        case 'w':
  ------------------
  |  Branch (432:9): [True: 198, False: 18.9k]
  ------------------
  433|    198|          bp = Format64(ep, 0, tm.tm_wday);
  434|    198|          result.append(bp, ep);
  435|    198|          break;
  436|    229|        case 'H':
  ------------------
  |  Branch (436:9): [True: 229, False: 18.8k]
  ------------------
  437|    229|          bp = Format02d(ep, al.cs.hour());
  438|    229|          result.append(bp, ep);
  439|    229|          break;
  440|    789|        case 'M':
  ------------------
  |  Branch (440:9): [True: 789, False: 18.3k]
  ------------------
  441|    789|          bp = Format02d(ep, al.cs.minute());
  442|    789|          result.append(bp, ep);
  443|    789|          break;
  444|  1.42k|        case 'S':
  ------------------
  |  Branch (444:9): [True: 1.42k, False: 17.6k]
  ------------------
  445|  1.42k|          bp = Format02d(ep, al.cs.second());
  446|  1.42k|          result.append(bp, ep);
  447|  1.42k|          break;
  448|    498|        case 'T':
  ------------------
  |  Branch (448:9): [True: 498, False: 18.6k]
  ------------------
  449|    498|          bp = Format02d(ep, al.cs.second());
  450|    498|          *--bp = ':';
  451|    498|          bp = Format02d(bp, al.cs.minute());
  452|    498|          *--bp = ':';
  453|    498|          bp = Format02d(bp, al.cs.hour());
  454|    498|          result.append(bp, ep);
  455|    498|          break;
  456|  5.09k|        case 'z':
  ------------------
  |  Branch (456:9): [True: 5.09k, False: 14.0k]
  ------------------
  457|  5.09k|          bp = FormatOffset(ep, al.offset, "");
  458|  5.09k|          result.append(bp, ep);
  459|  5.09k|          break;
  460|    761|        case 'Z':
  ------------------
  |  Branch (460:9): [True: 761, False: 18.3k]
  ------------------
  461|    761|          result.append(al.abbr);
  462|    761|          break;
  463|    966|        case 's':
  ------------------
  |  Branch (463:9): [True: 966, False: 18.1k]
  ------------------
  464|    966|          bp = Format64(ep, 0, ToUnixSeconds(tp));
  465|    966|          result.append(bp, ep);
  466|    966|          break;
  467|      0|        case '%':
  ------------------
  |  Branch (467:9): [True: 0, False: 19.1k]
  ------------------
  468|      0|          result.push_back('%');
  469|      0|          break;
  470|  19.1k|      }
  471|  19.1k|      pending = ++cur;
  472|  19.1k|      continue;
  473|  19.1k|    }
  474|       |
  475|       |    // More complex specifiers that we handle ourselves.
  476|   159k|    if (*cur == ':' && cur + 1 != end) {
  ------------------
  |  Branch (476:9): [True: 18.5k, False: 140k]
  |  Branch (476:24): [True: 18.5k, False: 6]
  ------------------
  477|  18.5k|      if (*(cur + 1) == 'z') {
  ------------------
  |  Branch (477:11): [True: 4.37k, False: 14.1k]
  ------------------
  478|       |        // Formats %:z.
  479|  4.37k|        FormatTM(&result, std::string(pending, cur - 1), tm);
  480|  4.37k|        bp = FormatOffset(ep, al.offset, ":");
  481|  4.37k|        result.append(bp, ep);
  482|  4.37k|        pending = cur += 2;
  483|  4.37k|        continue;
  484|  4.37k|      }
  485|  14.1k|      if (*(cur + 1) == ':' && cur + 2 != end) {
  ------------------
  |  Branch (485:11): [True: 9.23k, False: 4.93k]
  |  Branch (485:32): [True: 9.22k, False: 4]
  ------------------
  486|  9.22k|        if (*(cur + 2) == 'z') {
  ------------------
  |  Branch (486:13): [True: 4.02k, False: 5.20k]
  ------------------
  487|       |          // Formats %::z.
  488|  4.02k|          FormatTM(&result, std::string(pending, cur - 1), tm);
  489|  4.02k|          bp = FormatOffset(ep, al.offset, ":*");
  490|  4.02k|          result.append(bp, ep);
  491|  4.02k|          pending = cur += 3;
  492|  4.02k|          continue;
  493|  4.02k|        }
  494|  5.20k|        if (*(cur + 2) == ':' && cur + 3 != end) {
  ------------------
  |  Branch (494:13): [True: 2.94k, False: 2.26k]
  |  Branch (494:34): [True: 2.94k, False: 1]
  ------------------
  495|  2.94k|          if (*(cur + 3) == 'z') {
  ------------------
  |  Branch (495:15): [True: 1.58k, False: 1.36k]
  ------------------
  496|       |            // Formats %:::z.
  497|  1.58k|            FormatTM(&result, std::string(pending, cur - 1), tm);
  498|  1.58k|            bp = FormatOffset(ep, al.offset, ":*:");
  499|  1.58k|            result.append(bp, ep);
  500|  1.58k|            pending = cur += 4;
  501|  1.58k|            continue;
  502|  1.58k|          }
  503|  2.94k|        }
  504|  5.20k|      }
  505|  14.1k|    }
  506|       |
  507|       |    // Loop if there is no E modifier.
  508|   149k|    if (*cur != 'E' || ++cur == end) continue;
  ------------------
  |  Branch (508:9): [True: 41.5k, False: 107k]
  |  Branch (508:24): [True: 14, False: 107k]
  ------------------
  509|       |
  510|       |    // Format our extensions.
  511|   107k|    if (*cur == 'T') {
  ------------------
  |  Branch (511:9): [True: 2.51k, False: 105k]
  ------------------
  512|       |      // Formats %ET.
  513|  2.51k|      FormatTM(&result, std::string(pending, cur - 2), tm);
  514|  2.51k|      result.append("T");
  515|  2.51k|      pending = ++cur;
  516|   105k|    } else if (*cur == 'z') {
  ------------------
  |  Branch (516:16): [True: 4.39k, False: 100k]
  ------------------
  517|       |      // Formats %Ez.
  518|  4.39k|      FormatTM(&result, std::string(pending, cur - 2), tm);
  519|  4.39k|      bp = FormatOffset(ep, al.offset, ":");
  520|  4.39k|      result.append(bp, ep);
  521|  4.39k|      pending = ++cur;
  522|   100k|    } else if (*cur == '*' && cur + 1 != end && *(cur + 1) == 'z') {
  ------------------
  |  Branch (522:16): [True: 71.6k, False: 28.9k]
  |  Branch (522:31): [True: 71.6k, False: 7]
  |  Branch (522:49): [True: 6.25k, False: 65.4k]
  ------------------
  523|       |      // Formats %E*z.
  524|  6.25k|      FormatTM(&result, std::string(pending, cur - 2), tm);
  525|  6.25k|      bp = FormatOffset(ep, al.offset, ":*");
  526|  6.25k|      result.append(bp, ep);
  527|  6.25k|      pending = cur += 2;
  528|  94.3k|    } else if (*cur == '*' && cur + 1 != end &&
  ------------------
  |  Branch (528:16): [True: 65.4k, False: 28.9k]
  |  Branch (528:31): [True: 65.4k, False: 7]
  ------------------
  529|  65.4k|               (*(cur + 1) == 'S' || *(cur + 1) == 'f')) {
  ------------------
  |  Branch (529:17): [True: 62.2k, False: 3.16k]
  |  Branch (529:38): [True: 1.49k, False: 1.67k]
  ------------------
  530|       |      // Formats %E*S or %E*F.
  531|  63.7k|      FormatTM(&result, std::string(pending, cur - 2), tm);
  532|  63.7k|      char* cp = ep;
  533|  63.7k|      bp = Format64(cp, 15, fs.count());
  534|  1.02M|      while (cp != bp && cp[-1] == '0') --cp;
  ------------------
  |  Branch (534:14): [True: 956k, False: 63.7k]
  |  Branch (534:26): [True: 956k, False: 0]
  ------------------
  535|  63.7k|      switch (*(cur + 1)) {
  ------------------
  |  Branch (535:15): [True: 63.7k, False: 0]
  ------------------
  536|  62.2k|        case 'S':
  ------------------
  |  Branch (536:9): [True: 62.2k, False: 1.49k]
  ------------------
  537|  62.2k|          if (cp != bp) *--bp = '.';
  ------------------
  |  Branch (537:15): [True: 0, False: 62.2k]
  ------------------
  538|  62.2k|          bp = Format02d(bp, al.cs.second());
  539|  62.2k|          break;
  540|  1.49k|        case 'f':
  ------------------
  |  Branch (540:9): [True: 1.49k, False: 62.2k]
  ------------------
  541|  1.49k|          if (cp == bp) *--bp = '0';
  ------------------
  |  Branch (541:15): [True: 1.49k, False: 0]
  ------------------
  542|  1.49k|          break;
  543|  63.7k|      }
  544|  63.7k|      result.append(bp, cp);
  545|  63.7k|      pending = cur += 2;
  546|  63.7k|    } else if (*cur == '4' && cur + 1 != end && *(cur + 1) == 'Y') {
  ------------------
  |  Branch (546:16): [True: 4.67k, False: 25.9k]
  |  Branch (546:31): [True: 4.66k, False: 7]
  |  Branch (546:49): [True: 3.26k, False: 1.40k]
  ------------------
  547|       |      // Formats %E4Y.
  548|  3.26k|      FormatTM(&result, std::string(pending, cur - 2), tm);
  549|  3.26k|      bp = Format64(ep, 4, al.cs.year());
  550|  3.26k|      result.append(bp, ep);
  551|  3.26k|      pending = cur += 2;
  552|  27.3k|    } else if (std::isdigit(*cur)) {
  ------------------
  |  Branch (552:16): [True: 17.3k, False: 9.94k]
  ------------------
  553|       |      // Possibly found %E#S or %E#f.
  554|  17.3k|      int n = 0;
  555|  17.3k|      if (const char* np = ParseInt(cur, 0, 0, 1024, &n)) {
  ------------------
  |  Branch (555:23): [True: 7.42k, False: 9.95k]
  ------------------
  556|  7.42k|        if (*np == 'S' || *np == 'f') {
  ------------------
  |  Branch (556:13): [True: 2.12k, False: 5.30k]
  |  Branch (556:27): [True: 1.80k, False: 3.50k]
  ------------------
  557|       |          // Formats %E#S or %E#f.
  558|  3.92k|          FormatTM(&result, std::string(pending, cur - 2), tm);
  559|  3.92k|          bp = ep;
  560|  3.92k|          if (n > 0) {
  ------------------
  |  Branch (560:15): [True: 2.93k, False: 989]
  ------------------
  561|  2.93k|            if (n > kDigits10_64) n = kDigits10_64;
  ------------------
  |  Branch (561:17): [True: 292, False: 2.64k]
  ------------------
  562|  2.93k|            bp = Format64(bp, n, (n > 15) ? fs.count() * kExp10[n - 15]
  ------------------
  |  Branch (562:34): [True: 296, False: 2.63k]
  ------------------
  563|  2.93k|                                          : fs.count() / kExp10[15 - n]);
  564|  2.93k|            if (*np == 'S') *--bp = '.';
  ------------------
  |  Branch (564:17): [True: 1.39k, False: 1.53k]
  ------------------
  565|  2.93k|          }
  566|  3.92k|          if (*np == 'S') bp = Format02d(bp, al.cs.second());
  ------------------
  |  Branch (566:15): [True: 2.12k, False: 1.80k]
  ------------------
  567|  3.92k|          result.append(bp, ep);
  568|  3.92k|          pending = cur = ++np;
  569|  3.92k|        }
  570|  7.42k|      }
  571|  17.3k|    }
  572|   107k|  }
  573|       |
  574|       |  // Formats any remaining data.
  575|  8.48k|  FormatTM(&result, std::string(pending, end), tm);
  576|       |
  577|  8.48k|  return result;
  578|  8.48k|}
_ZN4cctz6detail5parseERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_RKNS_9time_zoneEPNS1_6chrono10time_pointINSD_12system_clockENSD_8durationIlNS1_5ratioILl1ELl1EEEEEEEPNSG_IlNSH_ILl1ELl1000000000000000EEEEEPS7_:
  695|  8.48k|           detail::femtoseconds* fs, std::string* err) {
  696|       |  // The unparsed input.  Even though we allow NULs in input, and
  697|       |  // match them against corresponding NULs in format, we depend on
  698|       |  // *edata being a NUL so that we can call strptime().  This also
  699|       |  // makes our handling of input easier.
  700|  8.48k|  const char* data = input.c_str();  // NUL terminated
  701|  8.48k|  const char* const edata = data + input.size();
  702|       |
  703|       |  // Skips leading whitespace.
  704|  8.86k|  while (std::isspace(*data)) ++data;
  ------------------
  |  Branch (704:10): [True: 378, False: 8.48k]
  ------------------
  705|       |
  706|  8.48k|  const year_t kyearmax = std::numeric_limits<year_t>::max();
  707|  8.48k|  const year_t kyearmin = std::numeric_limits<year_t>::min();
  708|       |
  709|       |  // Sets default values for unspecified fields.
  710|  8.48k|  bool saw_year = false;
  711|  8.48k|  year_t year = 1970;
  712|  8.48k|  std::tm tm{};
  713|  8.48k|  tm.tm_year = 1970 - 1900;
  714|  8.48k|  tm.tm_mon = 1 - 1;  // Jan
  715|  8.48k|  tm.tm_mday = 1;
  716|  8.48k|  tm.tm_hour = 0;
  717|  8.48k|  tm.tm_min = 0;
  718|  8.48k|  tm.tm_sec = 0;
  719|  8.48k|  tm.tm_wday = 4;  // Thu
  720|  8.48k|  tm.tm_yday = 0;
  721|  8.48k|  tm.tm_isdst = 0;
  722|  8.48k|  auto subseconds = detail::femtoseconds::zero();
  723|  8.48k|  bool saw_offset = false;
  724|  8.48k|  int offset = 0;  // No offset from passed tz.
  725|  8.48k|  std::string zone = "UTC";
  726|       |
  727|       |  // Even though we allow NULs in format, and match them against
  728|       |  // corresponding NULs in input, we simplify its handling by also
  729|       |  // ensuring that *efmt is a NUL.
  730|  8.48k|  const char* fmt = format.c_str();  // NUL terminated
  731|  8.48k|  const char* const efmt = fmt + format.size();
  732|  8.48k|  bool twelve_hour = false;
  733|  8.48k|  bool afternoon = false;
  734|  8.48k|  int week_num = -1;
  735|  8.48k|  weekday week_start = weekday::sunday;
  736|       |
  737|  8.48k|  bool saw_percent_s = false;
  738|  8.48k|  std::int_fast64_t percent_s = 0;
  739|       |
  740|       |  // Steps through format, one specifier at a time.
  741|  33.0k|  while (data != nullptr && fmt != efmt) {
  ------------------
  |  Branch (741:10): [True: 30.4k, False: 2.55k]
  |  Branch (741:29): [True: 24.5k, False: 5.93k]
  ------------------
  742|  24.5k|    if (std::isspace(*fmt)) {
  ------------------
  |  Branch (742:9): [True: 1.07k, False: 23.4k]
  ------------------
  743|  2.21k|      while (std::isspace(*data)) ++data;
  ------------------
  |  Branch (743:14): [True: 1.13k, False: 1.07k]
  ------------------
  744|  1.27k|      while (std::isspace(*++fmt)) continue;
  ------------------
  |  Branch (744:14): [True: 203, False: 1.07k]
  ------------------
  745|  1.07k|      continue;
  746|  1.07k|    }
  747|       |
  748|  23.4k|    if (*fmt != '%') {
  ------------------
  |  Branch (748:9): [True: 1.59k, False: 21.8k]
  ------------------
  749|  1.59k|      if (data != edata && *data == *fmt) {
  ------------------
  |  Branch (749:11): [True: 1.44k, False: 148]
  |  Branch (749:28): [True: 1.33k, False: 114]
  ------------------
  750|  1.33k|        ++data;
  751|  1.33k|        ++fmt;
  752|  1.33k|      } else {
  753|    262|        data = nullptr;
  754|    262|      }
  755|  1.59k|      continue;
  756|  1.59k|    }
  757|       |
  758|  21.8k|    const char* const percent = fmt;
  759|  21.8k|    if (++fmt == efmt) {
  ------------------
  |  Branch (759:9): [True: 20, False: 21.8k]
  ------------------
  760|     20|      data = nullptr;
  761|     20|      continue;
  762|     20|    }
  763|  21.8k|    switch (*fmt++) {
  ------------------
  |  Branch (763:13): [True: 21.2k, False: 592]
  ------------------
  764|      2|      case '\0':
  ------------------
  |  Branch (764:7): [True: 2, False: 21.8k]
  ------------------
  765|       |        // Because we allow NULs in the format string, we must give
  766|       |        // some meaning to the "%\0" specifier.  We choose the common
  767|       |        // (but undefined) strptime() behavior of failing on unknown
  768|       |        // specifiers.
  769|      2|        data = nullptr;
  770|      2|        continue;
  771|  1.93k|      case 'Y':
  ------------------
  |  Branch (771:7): [True: 1.93k, False: 19.9k]
  ------------------
  772|       |        // Symmetrically with format(), directly handing %Y avoids the
  773|       |        // tm.tm_year overflow problem.  However, tm.tm_year will still be
  774|       |        // used by other specifiers like %D.
  775|  1.93k|        data = ParseInt(data, 0, kyearmin, kyearmax, &year);
  776|  1.93k|        if (data != nullptr) saw_year = true;
  ------------------
  |  Branch (776:13): [True: 1.84k, False: 91]
  ------------------
  777|  1.93k|        continue;
  778|    357|      case 'm':
  ------------------
  |  Branch (778:7): [True: 357, False: 21.4k]
  ------------------
  779|    357|        data = ParseInt(data, 2, 1, 12, &tm.tm_mon);
  780|    357|        if (data != nullptr) tm.tm_mon -= 1;
  ------------------
  |  Branch (780:13): [True: 318, False: 39]
  ------------------
  781|    357|        week_num = -1;
  782|    357|        continue;
  783|    118|      case 'd':
  ------------------
  |  Branch (783:7): [True: 118, False: 21.7k]
  ------------------
  784|    410|      case 'e':
  ------------------
  |  Branch (784:7): [True: 292, False: 21.5k]
  ------------------
  785|    410|        data = ParseInt(data, 2, 1, 31, &tm.tm_mday);
  786|    410|        week_num = -1;
  787|    410|        continue;
  788|    641|      case 'F':
  ------------------
  |  Branch (788:7): [True: 641, False: 21.2k]
  ------------------
  789|    641|        data = ParseInt(data, 0, kyearmin, kyearmax, &year);
  790|    641|        if (data != nullptr) {
  ------------------
  |  Branch (790:13): [True: 595, False: 46]
  ------------------
  791|    595|          saw_year = true;
  792|    595|          data = (*data == '-' ? data + 1 : nullptr);
  ------------------
  |  Branch (792:19): [True: 356, False: 239]
  ------------------
  793|    595|        }
  794|    641|        data = ParseInt(data, 2, 1, 12, &tm.tm_mon);
  795|    641|        if (data != nullptr) {
  ------------------
  |  Branch (795:13): [True: 321, False: 320]
  ------------------
  796|    321|          tm.tm_mon -= 1;
  797|    321|          data = (*data == '-' ? data + 1 : nullptr);
  ------------------
  |  Branch (797:19): [True: 302, False: 19]
  ------------------
  798|    321|        }
  799|    641|        data = ParseInt(data, 2, 1, 31, &tm.tm_mday);
  800|    641|        week_num = -1;
  801|    641|        continue;
  802|    441|      case 'U':
  ------------------
  |  Branch (802:7): [True: 441, False: 21.4k]
  ------------------
  803|    441|        data = ParseInt(data, 0, 0, 53, &week_num);
  804|    441|        week_start = weekday::sunday;
  805|    441|        continue;
  806|    372|      case 'W':
  ------------------
  |  Branch (806:7): [True: 372, False: 21.4k]
  ------------------
  807|    372|        data = ParseInt(data, 0, 0, 53, &week_num);
  808|    372|        week_start = weekday::monday;
  809|    372|        continue;
  810|    260|      case 'u':
  ------------------
  |  Branch (810:7): [True: 260, False: 21.5k]
  ------------------
  811|    260|        data = ParseInt(data, 0, 1, 7, &tm.tm_wday);
  812|    260|        if (data != nullptr) tm.tm_wday %= 7;
  ------------------
  |  Branch (812:13): [True: 74, False: 186]
  ------------------
  813|    260|        continue;
  814|    303|      case 'w':
  ------------------
  |  Branch (814:7): [True: 303, False: 21.5k]
  ------------------
  815|    303|        data = ParseInt(data, 0, 0, 6, &tm.tm_wday);
  816|    303|        continue;
  817|    285|      case 'H':
  ------------------
  |  Branch (817:7): [True: 285, False: 21.5k]
  ------------------
  818|    285|        data = ParseInt(data, 2, 0, 23, &tm.tm_hour);
  819|    285|        twelve_hour = false;
  820|    285|        continue;
  821|    539|      case 'M':
  ------------------
  |  Branch (821:7): [True: 539, False: 21.3k]
  ------------------
  822|    539|        data = ParseInt(data, 2, 0, 59, &tm.tm_min);
  823|    539|        continue;
  824|    197|      case 'S':
  ------------------
  |  Branch (824:7): [True: 197, False: 21.6k]
  ------------------
  825|    197|        data = ParseInt(data, 2, 0, 60, &tm.tm_sec);
  826|    197|        continue;
  827|    458|      case 'T':
  ------------------
  |  Branch (827:7): [True: 458, False: 21.3k]
  ------------------
  828|    458|        data = ParseInt(data, 2, 0, 23, &tm.tm_hour);
  829|    458|        twelve_hour = false;
  830|    458|        data = (data != nullptr && *data == ':' ? data + 1 : nullptr);
  ------------------
  |  Branch (830:17): [True: 424, False: 34]
  |  Branch (830:36): [True: 406, False: 18]
  ------------------
  831|    458|        data = ParseInt(data, 2, 0, 59, &tm.tm_min);
  832|    458|        data = (data != nullptr && *data == ':' ? data + 1 : nullptr);
  ------------------
  |  Branch (832:17): [True: 374, False: 84]
  |  Branch (832:36): [True: 340, False: 34]
  ------------------
  833|    458|        data = ParseInt(data, 2, 0, 60, &tm.tm_sec);
  834|    458|        continue;
  835|     47|      case 'I':
  ------------------
  |  Branch (835:7): [True: 47, False: 21.8k]
  ------------------
  836|    119|      case 'l':
  ------------------
  |  Branch (836:7): [True: 72, False: 21.7k]
  ------------------
  837|    131|      case 'r':  // probably uses %I
  ------------------
  |  Branch (837:7): [True: 12, False: 21.8k]
  ------------------
  838|    131|        twelve_hour = true;
  839|    131|        break;
  840|     29|      case 'R':  // uses %H
  ------------------
  |  Branch (840:7): [True: 29, False: 21.8k]
  ------------------
  841|     30|      case 'c':  // probably uses %H
  ------------------
  |  Branch (841:7): [True: 1, False: 21.8k]
  ------------------
  842|     45|      case 'X':  // probably uses %H
  ------------------
  |  Branch (842:7): [True: 15, False: 21.8k]
  ------------------
  843|     45|        twelve_hour = false;
  844|     45|        break;
  845|  2.36k|      case 'z':
  ------------------
  |  Branch (845:7): [True: 2.36k, False: 19.4k]
  ------------------
  846|  2.36k|        data = ParseOffset(data, "", &offset);
  847|  2.36k|        if (data != nullptr) saw_offset = true;
  ------------------
  |  Branch (847:13): [True: 2.28k, False: 74]
  ------------------
  848|  2.36k|        continue;
  849|    626|      case 'Z':  // ignored; zone abbreviations are ambiguous
  ------------------
  |  Branch (849:7): [True: 626, False: 21.2k]
  ------------------
  850|    626|        data = ParseZone(data, &zone);
  851|    626|        continue;
  852|    604|      case 's':
  ------------------
  |  Branch (852:7): [True: 604, False: 21.2k]
  ------------------
  853|    604|        data = ParseInt(data, 0,
  854|    604|                        std::numeric_limits<std::int_fast64_t>::min(),
  855|    604|                        std::numeric_limits<std::int_fast64_t>::max(),
  856|    604|                        &percent_s);
  857|    604|        if (data != nullptr) saw_percent_s = true;
  ------------------
  |  Branch (857:13): [True: 515, False: 89]
  ------------------
  858|    604|        continue;
  859|  1.21k|      case ':':
  ------------------
  |  Branch (859:7): [True: 1.21k, False: 20.6k]
  ------------------
  860|  1.21k|        if (fmt[0] == 'z' ||
  ------------------
  |  Branch (860:13): [True: 795, False: 424]
  ------------------
  861|    424|            (fmt[0] == ':' &&
  ------------------
  |  Branch (861:14): [True: 406, False: 18]
  ------------------
  862|  1.18k|             (fmt[1] == 'z' || (fmt[1] == ':' && fmt[2] == 'z')))) {
  ------------------
  |  Branch (862:15): [True: 312, False: 94]
  |  Branch (862:33): [True: 81, False: 13]
  |  Branch (862:50): [True: 78, False: 3]
  ------------------
  863|  1.18k|          data = ParseOffset(data, ":", &offset);
  864|  1.18k|          if (data != nullptr) saw_offset = true;
  ------------------
  |  Branch (864:15): [True: 1.16k, False: 21]
  ------------------
  865|  1.18k|          fmt += (fmt[0] == 'z') ? 1 : (fmt[1] == 'z') ? 2 : 3;
  ------------------
  |  Branch (865:18): [True: 795, False: 390]
  |  Branch (865:40): [True: 312, False: 78]
  ------------------
  866|  1.18k|          continue;
  867|  1.18k|        }
  868|     34|        break;
  869|    200|      case '%':
  ------------------
  |  Branch (869:7): [True: 200, False: 21.6k]
  ------------------
  870|    200|        data = (*data == '%' ? data + 1 : nullptr);
  ------------------
  |  Branch (870:17): [True: 194, False: 6]
  ------------------
  871|    200|        continue;
  872|  9.78k|      case 'E':
  ------------------
  |  Branch (872:7): [True: 9.78k, False: 12.0k]
  ------------------
  873|  9.78k|        if (fmt[0] == 'T') {
  ------------------
  |  Branch (873:13): [True: 398, False: 9.38k]
  ------------------
  874|    398|          if (*data == 'T' || *data == 't') {
  ------------------
  |  Branch (874:15): [True: 194, False: 204]
  |  Branch (874:31): [True: 194, False: 10]
  ------------------
  875|    388|            ++data;
  876|    388|            ++fmt;
  877|    388|          } else {
  878|     10|            data = nullptr;
  879|     10|          }
  880|    398|          continue;
  881|    398|        }
  882|  9.38k|        if (fmt[0] == 'z' || (fmt[0] == '*' && fmt[1] == 'z')) {
  ------------------
  |  Branch (882:13): [True: 2.47k, False: 6.91k]
  |  Branch (882:31): [True: 5.15k, False: 1.75k]
  |  Branch (882:48): [True: 910, False: 4.24k]
  ------------------
  883|  3.38k|          data = ParseOffset(data, ":", &offset);
  884|  3.38k|          if (data != nullptr) saw_offset = true;
  ------------------
  |  Branch (884:15): [True: 3.36k, False: 16]
  ------------------
  885|  3.38k|          fmt += (fmt[0] == 'z') ? 1 : 2;
  ------------------
  |  Branch (885:18): [True: 2.47k, False: 910]
  ------------------
  886|  3.38k|          continue;
  887|  3.38k|        }
  888|  6.00k|        if (fmt[0] == '*' && fmt[1] == 'S') {
  ------------------
  |  Branch (888:13): [True: 4.24k, False: 1.75k]
  |  Branch (888:30): [True: 371, False: 3.87k]
  ------------------
  889|    371|          data = ParseInt(data, 2, 0, 60, &tm.tm_sec);
  890|    371|          if (data != nullptr && *data == '.') {
  ------------------
  |  Branch (890:15): [True: 364, False: 7]
  |  Branch (890:34): [True: 3, False: 361]
  ------------------
  891|      3|            data = ParseSubSeconds(data + 1, &subseconds);
  892|      3|          }
  893|    371|          fmt += 2;
  894|    371|          continue;
  895|    371|        }
  896|  5.63k|        if (fmt[0] == '*' && fmt[1] == 'f') {
  ------------------
  |  Branch (896:13): [True: 3.87k, False: 1.75k]
  |  Branch (896:30): [True: 3.84k, False: 31]
  ------------------
  897|  3.84k|          if (data != nullptr && std::isdigit(*data)) {
  ------------------
  |  Branch (897:15): [True: 3.84k, False: 0]
  |  Branch (897:34): [True: 1.42k, False: 2.41k]
  ------------------
  898|  1.42k|            data = ParseSubSeconds(data, &subseconds);
  899|  1.42k|          }
  900|  3.84k|          fmt += 2;
  901|  3.84k|          continue;
  902|  3.84k|        }
  903|  1.78k|        if (fmt[0] == '4' && fmt[1] == 'Y') {
  ------------------
  |  Branch (903:13): [True: 544, False: 1.24k]
  |  Branch (903:30): [True: 248, False: 296]
  ------------------
  904|    248|          const char* bp = data;
  905|    248|          data = ParseInt(data, 4, year_t{-999}, year_t{9999}, &year);
  906|    248|          if (data != nullptr) {
  ------------------
  |  Branch (906:15): [True: 232, False: 16]
  ------------------
  907|    232|            if (data - bp == 4) {
  ------------------
  |  Branch (907:17): [True: 184, False: 48]
  ------------------
  908|    184|              saw_year = true;
  909|    184|            } else {
  910|     48|              data = nullptr;  // stopped too soon
  911|     48|            }
  912|    232|          }
  913|    248|          fmt += 2;
  914|    248|          continue;
  915|    248|        }
  916|  1.54k|        if (std::isdigit(*fmt)) {
  ------------------
  |  Branch (916:13): [True: 1.43k, False: 103]
  ------------------
  917|  1.43k|          int n = 0;  // value ignored
  918|  1.43k|          if (const char* np = ParseInt(fmt, 0, 0, 1024, &n)) {
  ------------------
  |  Branch (918:27): [True: 1.30k, False: 129]
  ------------------
  919|  1.30k|            if (*np == 'S') {
  ------------------
  |  Branch (919:17): [True: 200, False: 1.10k]
  ------------------
  920|    200|              data = ParseInt(data, 2, 0, 60, &tm.tm_sec);
  921|    200|              if (data != nullptr && *data == '.') {
  ------------------
  |  Branch (921:19): [True: 184, False: 16]
  |  Branch (921:38): [True: 3, False: 181]
  ------------------
  922|      3|                data = ParseSubSeconds(data + 1, &subseconds);
  923|      3|              }
  924|    200|              fmt = ++np;
  925|    200|              continue;
  926|    200|            }
  927|  1.10k|            if (*np == 'f') {
  ------------------
  |  Branch (927:17): [True: 1.05k, False: 55]
  ------------------
  928|  1.05k|              if (data != nullptr && std::isdigit(*data)) {
  ------------------
  |  Branch (928:19): [True: 1.05k, False: 0]
  |  Branch (928:38): [True: 369, False: 684]
  ------------------
  929|    369|                data = ParseSubSeconds(data, &subseconds);
  930|    369|              }
  931|  1.05k|              fmt = ++np;
  932|  1.05k|              continue;
  933|  1.05k|            }
  934|  1.10k|          }
  935|  1.43k|        }
  936|    287|        if (*fmt == 'c') twelve_hour = false;  // probably uses %H
  ------------------
  |  Branch (936:13): [True: 1, False: 286]
  ------------------
  937|    287|        if (*fmt == 'X') twelve_hour = false;  // probably uses %H
  ------------------
  |  Branch (937:13): [True: 3, False: 284]
  ------------------
  938|    287|        if (*fmt != '\0') ++fmt;
  ------------------
  |  Branch (938:13): [True: 276, False: 11]
  ------------------
  939|    287|        break;
  940|     91|      case 'O':
  ------------------
  |  Branch (940:7): [True: 91, False: 21.7k]
  ------------------
  941|     91|        if (*fmt == 'H') twelve_hour = false;
  ------------------
  |  Branch (941:13): [True: 34, False: 57]
  ------------------
  942|     91|        if (*fmt == 'I') twelve_hour = true;
  ------------------
  |  Branch (942:13): [True: 35, False: 56]
  ------------------
  943|     91|        if (*fmt != '\0') ++fmt;
  ------------------
  |  Branch (943:13): [True: 86, False: 5]
  ------------------
  944|     91|        break;
  945|  21.8k|    }
  946|       |
  947|       |    // Parses the current specifier.
  948|  1.18k|    const char* const orig_data = data;
  949|  1.18k|    std::string spec(percent, fmt);
  950|  1.18k|    data = ParseTM(data, spec.c_str(), &tm);
  951|       |
  952|       |    // If we successfully parsed %p we need to remember whether the result
  953|       |    // was AM or PM so that we can adjust tm_hour before time_zone::lookup().
  954|       |    // So reparse the input with a known AM hour, and check if it is shifted
  955|       |    // to a PM hour.
  956|  1.18k|    if (spec == "%p" && data != nullptr) {
  ------------------
  |  Branch (956:9): [True: 100, False: 1.08k]
  |  Branch (956:25): [True: 95, False: 5]
  ------------------
  957|     95|      std::string test_input = "1";
  958|     95|      test_input.append(orig_data, data);
  959|     95|      std::tm tmp{};
  960|     95|      ParseTM(test_input.c_str(), "%I%p", &tmp);
  961|     95|      afternoon = (tmp.tm_hour == 13);
  962|     95|    }
  963|  1.18k|  }
  964|       |
  965|       |  // Adjust a 12-hour tm_hour value if it should be in the afternoon.
  966|  8.48k|  if (twelve_hour && afternoon && tm.tm_hour < 12) {
  ------------------
  |  Branch (966:7): [True: 44, False: 8.43k]
  |  Branch (966:22): [True: 4, False: 40]
  |  Branch (966:35): [True: 3, False: 1]
  ------------------
  967|      3|    tm.tm_hour += 12;
  968|      3|  }
  969|       |
  970|  8.48k|  if (data == nullptr) {
  ------------------
  |  Branch (970:7): [True: 2.55k, False: 5.93k]
  ------------------
  971|  2.55k|    if (err != nullptr) *err = "Failed to parse input";
  ------------------
  |  Branch (971:9): [True: 0, False: 2.55k]
  ------------------
  972|  2.55k|    return false;
  973|  2.55k|  }
  974|       |
  975|       |  // Skip any remaining whitespace.
  976|  6.12k|  while (std::isspace(*data)) ++data;
  ------------------
  |  Branch (976:10): [True: 199, False: 5.93k]
  ------------------
  977|       |
  978|       |  // parse() must consume the entire input string.
  979|  5.93k|  if (data != edata) {
  ------------------
  |  Branch (979:7): [True: 281, False: 5.64k]
  ------------------
  980|    281|    if (err != nullptr) *err = "Illegal trailing data in input string";
  ------------------
  |  Branch (980:9): [True: 0, False: 281]
  ------------------
  981|    281|    return false;
  982|    281|  }
  983|       |
  984|       |  // If we saw %s then we ignore anything else and return that time.
  985|  5.64k|  if (saw_percent_s) {
  ------------------
  |  Branch (985:7): [True: 254, False: 5.39k]
  ------------------
  986|    254|    *sec = FromUnixSeconds(percent_s);
  987|    254|    *fs = detail::femtoseconds::zero();
  988|    254|    return true;
  989|    254|  }
  990|       |
  991|       |  // If we saw %z, %Ez, or %E*z then we want to interpret the parsed fields
  992|       |  // in UTC and then shift by that offset.  Otherwise we want to interpret
  993|       |  // the fields directly in the passed time_zone.
  994|  5.39k|  time_zone ptz = saw_offset ? utc_time_zone() : tz;
  ------------------
  |  Branch (994:19): [True: 170, False: 5.22k]
  ------------------
  995|       |
  996|       |  // Allows a leap second of 60 to normalize forward to the following ":00".
  997|  5.39k|  if (tm.tm_sec == 60) {
  ------------------
  |  Branch (997:7): [True: 31, False: 5.36k]
  ------------------
  998|     31|    tm.tm_sec -= 1;
  999|     31|    offset -= 1;
 1000|     31|    subseconds = detail::femtoseconds::zero();
 1001|     31|  }
 1002|       |
 1003|  5.39k|  if (!saw_year) {
  ------------------
  |  Branch (1003:7): [True: 3.68k, False: 1.71k]
  ------------------
 1004|  3.68k|    year = year_t{tm.tm_year};
 1005|  3.68k|    if (year > kyearmax - 1900) {
  ------------------
  |  Branch (1005:9): [True: 0, False: 3.68k]
  ------------------
 1006|       |      // Platform-dependent, maybe unreachable.
 1007|      0|      if (err != nullptr) *err = "Out-of-range year";
  ------------------
  |  Branch (1007:11): [True: 0, False: 0]
  ------------------
 1008|      0|      return false;
 1009|      0|    }
 1010|  3.68k|    year += 1900;
 1011|  3.68k|  }
 1012|       |
 1013|       |  // Compute year, tm.tm_mon and tm.tm_mday if we parsed a week number.
 1014|  5.39k|  if (week_num != -1) {
  ------------------
  |  Branch (1014:7): [True: 282, False: 5.11k]
  ------------------
 1015|    282|    if (!FromWeek(week_num, week_start, &year, &tm)) {
  ------------------
  |  Branch (1015:9): [True: 2, False: 280]
  ------------------
 1016|      2|      if (err != nullptr) *err = "Out-of-range field";
  ------------------
  |  Branch (1016:11): [True: 0, False: 2]
  ------------------
 1017|      2|      return false;
 1018|      2|    }
 1019|    282|  }
 1020|       |
 1021|  5.39k|  const int month = tm.tm_mon + 1;
 1022|  5.39k|  civil_second cs(year, month, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
 1023|       |
 1024|       |  // parse() should not allow normalization. Due to the restricted field
 1025|       |  // ranges above (see ParseInt()), the only possibility is for days to roll
 1026|       |  // into months. That is, parsing "Sep 31" should not produce "Oct 1".
 1027|  5.39k|  if (cs.month() != month || cs.day() != tm.tm_mday) {
  ------------------
  |  Branch (1027:7): [True: 3, False: 5.39k]
  |  Branch (1027:30): [True: 0, False: 5.39k]
  ------------------
 1028|      3|    if (err != nullptr) *err = "Out-of-range field";
  ------------------
  |  Branch (1028:9): [True: 0, False: 3]
  ------------------
 1029|      3|    return false;
 1030|      3|  }
 1031|       |
 1032|       |  // Accounts for the offset adjustment before converting to absolute time.
 1033|  5.39k|  if ((offset < 0 && cs > civil_second::max() + offset) ||
  ------------------
  |  Branch (1033:7): [True: 1, False: 5.38k]
  |  Branch (1033:8): [True: 102, False: 5.28k]
  |  Branch (1033:22): [True: 0, False: 102]
  ------------------
 1034|  5.39k|      (offset > 0 && cs < civil_second::min() + offset)) {
  ------------------
  |  Branch (1034:8): [True: 69, False: 5.32k]
  |  Branch (1034:22): [True: 1, False: 68]
  ------------------
 1035|      1|    if (err != nullptr) *err = "Out-of-range field";
  ------------------
  |  Branch (1035:9): [True: 0, False: 1]
  ------------------
 1036|      1|    return false;
 1037|      1|  }
 1038|  5.38k|  cs -= offset;
 1039|       |
 1040|  5.38k|  const auto tp = ptz.lookup(cs).pre;
 1041|       |  // Checks for overflow/underflow and returns an error as necessary.
 1042|  5.38k|  if (tp == time_point<seconds>::max()) {
  ------------------
  |  Branch (1042:7): [True: 381, False: 5.00k]
  ------------------
 1043|    381|    const auto al = ptz.lookup(time_point<seconds>::max());
 1044|    381|    if (cs > al.cs) {
  ------------------
  |  Branch (1044:9): [True: 224, False: 157]
  ------------------
 1045|    224|      if (err != nullptr) *err = "Out-of-range field";
  ------------------
  |  Branch (1045:11): [True: 0, False: 224]
  ------------------
 1046|    224|      return false;
 1047|    224|    }
 1048|    381|  }
 1049|  5.16k|  if (tp == time_point<seconds>::min()) {
  ------------------
  |  Branch (1049:7): [True: 363, False: 4.80k]
  ------------------
 1050|    363|    const auto al = ptz.lookup(time_point<seconds>::min());
 1051|    363|    if (cs < al.cs) {
  ------------------
  |  Branch (1051:9): [True: 167, False: 196]
  ------------------
 1052|    167|      if (err != nullptr) *err = "Out-of-range field";
  ------------------
  |  Branch (1052:11): [True: 0, False: 167]
  ------------------
 1053|    167|      return false;
 1054|    167|    }
 1055|    363|  }
 1056|       |
 1057|  4.99k|  *sec = tp;
 1058|  4.99k|  *fs = subseconds;
 1059|  4.99k|  return true;
 1060|  5.16k|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_14ToTMERKNS_9time_zone15absolute_lookupE:
  110|  8.48k|std::tm ToTM(const time_zone::absolute_lookup& al) {
  111|  8.48k|  std::tm tm{};
  112|  8.48k|  tm.tm_sec = al.cs.second();
  113|  8.48k|  tm.tm_min = al.cs.minute();
  114|  8.48k|  tm.tm_hour = al.cs.hour();
  115|  8.48k|  tm.tm_mday = al.cs.day();
  116|  8.48k|  tm.tm_mon = al.cs.month() - 1;
  117|       |
  118|       |  // Saturate tm.tm_year in cases of over/underflow.
  119|  8.48k|  if (al.cs.year() < std::numeric_limits<int>::min() + 1900) {
  ------------------
  |  Branch (119:7): [True: 0, False: 8.48k]
  ------------------
  120|      0|    tm.tm_year = std::numeric_limits<int>::min();
  121|  8.48k|  } else if (al.cs.year() - 1900 > std::numeric_limits<int>::max()) {
  ------------------
  |  Branch (121:14): [True: 620, False: 7.86k]
  ------------------
  122|    620|    tm.tm_year = std::numeric_limits<int>::max();
  123|  7.86k|  } else {
  124|  7.86k|    tm.tm_year = static_cast<int>(al.cs.year() - 1900);
  125|  7.86k|  }
  126|       |
  127|  8.48k|  tm.tm_wday = ToTmWday(get_weekday(al.cs));
  128|  8.48k|  tm.tm_yday = get_yearday(al.cs) - 1;
  129|  8.48k|  tm.tm_isdst = al.is_dst ? 1 : 0;
  ------------------
  |  Branch (129:17): [True: 641, False: 7.84k]
  ------------------
  130|  8.48k|  return tm;
  131|  8.48k|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_18ToTmWdayENS0_7weekdayE:
   69|  8.48k|int ToTmWday(weekday wd) {
   70|  8.48k|  switch (wd) {
  ------------------
  |  Branch (70:11): [True: 8.48k, False: 0]
  ------------------
   71|    489|    case weekday::sunday:
  ------------------
  |  Branch (71:5): [True: 489, False: 7.99k]
  ------------------
   72|    489|      return 0;
   73|    440|    case weekday::monday:
  ------------------
  |  Branch (73:5): [True: 440, False: 8.04k]
  ------------------
   74|    440|      return 1;
   75|  5.82k|    case weekday::tuesday:
  ------------------
  |  Branch (75:5): [True: 5.82k, False: 2.66k]
  ------------------
   76|  5.82k|      return 2;
   77|    442|    case weekday::wednesday:
  ------------------
  |  Branch (77:5): [True: 442, False: 8.04k]
  ------------------
   78|    442|      return 3;
   79|    492|    case weekday::thursday:
  ------------------
  |  Branch (79:5): [True: 492, False: 7.99k]
  ------------------
   80|    492|      return 4;
   81|    374|    case weekday::friday:
  ------------------
  |  Branch (81:5): [True: 374, False: 8.10k]
  ------------------
   82|    374|      return 5;
   83|    424|    case weekday::saturday:
  ------------------
  |  Branch (83:5): [True: 424, False: 8.05k]
  ------------------
   84|    424|      return 6;
   85|  8.48k|  }
   86|      0|  return 0; /*NOTREACHED*/
   87|  8.48k|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_18FormatTMEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKS8_RK2tm:
  213|   129k|void FormatTM(std::string* out, const std::string& fmt, const std::tm& tm) {
  214|       |  // We assume that 16 times the length of the format string will
  215|       |  // be sufficient to store the result.  The extreme case appears
  216|       |  // to be "%c" (2 chars), which, in the POSIX locale, produces
  217|       |  // "Thu Jan 1 00:00:00 1970" (24 chars).
  218|   129k|  auto out_size = out->size();
  219|   129k|  auto buf_size = (16 * fmt.size()) + 1;
  220|   129k|  out->resize(out_size + buf_size);
  221|   129k|  auto len = strftime(&(*out)[out_size], buf_size, fmt.c_str(), &tm);
  222|   129k|  out->resize(out_size + len);
  223|   129k|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_18Format64EPcil:
  145|  72.8k|char* Format64(char* ep, int width, std::int_fast64_t v) {
  146|  72.8k|  bool neg = false;
  147|  72.8k|  if (v < 0) {
  ------------------
  |  Branch (147:7): [True: 869, False: 71.9k]
  ------------------
  148|    869|    --width;
  149|    869|    neg = true;
  150|    869|    if (v == std::numeric_limits<std::int_fast64_t>::min()) {
  ------------------
  |  Branch (150:9): [True: 0, False: 869]
  ------------------
  151|       |      // Avoid negating minimum value.
  152|      0|      std::int_fast64_t last_digit = -(v % 10);
  153|      0|      v /= 10;
  154|      0|      if (last_digit < 0) {
  ------------------
  |  Branch (154:11): [True: 0, False: 0]
  ------------------
  155|      0|        ++v;
  156|      0|        last_digit += 10;
  157|      0|      }
  158|      0|      --width;
  159|      0|      *--ep = kDigits[last_digit];
  160|      0|    }
  161|    869|    v = -v;
  162|    869|  }
  163|   113k|  do {
  164|   113k|    --width;
  165|   113k|    *--ep = kDigits[v % 10];
  166|   113k|  } while (v /= 10);
  ------------------
  |  Branch (166:12): [True: 40.9k, False: 72.8k]
  ------------------
  167|   976k|  while (--width >= 0) *--ep = '0';  // zero pad
  ------------------
  |  Branch (167:10): [True: 904k, False: 72.8k]
  ------------------
  168|  72.8k|  if (neg) *--ep = '-';
  ------------------
  |  Branch (168:7): [True: 869, False: 71.9k]
  ------------------
  169|  72.8k|  return ep;
  170|  72.8k|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_19Format02dEPci:
  173|   136k|char* Format02d(char* ep, int v) {
  174|   136k|  *--ep = kDigits[v % 10];
  175|   136k|  *--ep = kDigits[(v / 10) % 10];
  176|   136k|  return ep;
  177|   136k|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_16ToWeekERKNS0_10civil_timeINS0_7day_tagEEENS0_7weekdayE:
  135|  4.39k|int ToWeek(const civil_day& cd, weekday week_start) {
  136|  4.39k|  const civil_day d(cd.year() % 400, cd.month(), cd.day());
  137|  4.39k|  return static_cast<int>((d - prev_weekday(civil_year(d), week_start)) / 7);
  138|  4.39k|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_112FormatOffsetEPciPKc:
  180|  25.7k|char* FormatOffset(char* ep, int offset, const char* mode) {
  181|       |  // TODO: Follow the RFC3339 "Unknown Local Offset Convention" and
  182|       |  // generate a "negative zero" when we're formatting a zero offset
  183|       |  // as the result of a failed load_time_zone().
  184|  25.7k|  char sign = '+';
  185|  25.7k|  if (offset < 0) {
  ------------------
  |  Branch (185:7): [True: 6.13k, False: 19.5k]
  ------------------
  186|  6.13k|    offset = -offset;  // bounded by 24h so no overflow
  187|  6.13k|    sign = '-';
  188|  6.13k|  }
  189|  25.7k|  const int seconds = offset % 60;
  190|  25.7k|  const int minutes = (offset /= 60) % 60;
  191|  25.7k|  const int hours = offset /= 60;
  192|  25.7k|  const char sep = mode[0];
  193|  25.7k|  const bool ext = (sep != '\0' && mode[1] == '*');
  ------------------
  |  Branch (193:21): [True: 20.6k, False: 5.09k]
  |  Branch (193:36): [True: 11.8k, False: 8.76k]
  ------------------
  194|  25.7k|  const bool ccc = (ext && mode[2] == ':');
  ------------------
  |  Branch (194:21): [True: 11.8k, False: 13.8k]
  |  Branch (194:28): [True: 1.58k, False: 10.2k]
  ------------------
  195|  25.7k|  if (ext && (!ccc || seconds != 0)) {
  ------------------
  |  Branch (195:7): [True: 11.8k, False: 13.8k]
  |  Branch (195:15): [True: 10.2k, False: 1.58k]
  |  Branch (195:23): [True: 402, False: 1.17k]
  ------------------
  196|  10.6k|    ep = Format02d(ep, seconds);
  197|  10.6k|    *--ep = sep;
  198|  15.0k|  } else {
  199|       |    // If we're not rendering seconds, sub-minute negative offsets
  200|       |    // should get a positive sign (e.g., offset=-10s => "+00:00").
  201|  15.0k|    if (hours == 0 && minutes == 0) sign = '+';
  ------------------
  |  Branch (201:9): [True: 4.16k, False: 10.8k]
  |  Branch (201:23): [True: 2.98k, False: 1.17k]
  ------------------
  202|  15.0k|  }
  203|  25.7k|  if (!ccc || minutes != 0 || seconds != 0) {
  ------------------
  |  Branch (203:7): [True: 24.1k, False: 1.58k]
  |  Branch (203:15): [True: 416, False: 1.16k]
  |  Branch (203:31): [True: 210, False: 955]
  ------------------
  204|  24.7k|    ep = Format02d(ep, minutes);
  205|  24.7k|    if (sep != '\0') *--ep = sep;
  ------------------
  |  Branch (205:9): [True: 19.6k, False: 5.09k]
  ------------------
  206|  24.7k|  }
  207|  25.7k|  ep = Format02d(ep, hours);
  208|  25.7k|  *--ep = sign;
  209|  25.7k|  return ep;
  210|  25.7k|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_111ParseOffsetEPKcS3_Pi:
  582|  6.93k|const char* ParseOffset(const char* dp, const char* mode, int* offset) {
  583|  6.93k|  if (dp != nullptr) {
  ------------------
  |  Branch (583:7): [True: 6.93k, False: 0]
  ------------------
  584|  6.93k|    const char first = *dp++;
  585|  6.93k|    if (first == '+' || first == '-') {
  ------------------
  |  Branch (585:9): [True: 1.56k, False: 5.37k]
  |  Branch (585:25): [True: 3.93k, False: 1.43k]
  ------------------
  586|  5.50k|      char sep = mode[0];
  587|  5.50k|      int hours = 0;
  588|  5.50k|      int minutes = 0;
  589|  5.50k|      int seconds = 0;
  590|  5.50k|      const char* ap = ParseInt(dp, 2, 0, 23, &hours);
  591|  5.50k|      if (ap != nullptr && ap - dp == 2) {
  ------------------
  |  Branch (591:11): [True: 5.46k, False: 31]
  |  Branch (591:28): [True: 5.45k, False: 11]
  ------------------
  592|  5.45k|        dp = ap;
  593|  5.45k|        if (sep != '\0' && *ap == sep) ++ap;
  ------------------
  |  Branch (593:13): [True: 3.39k, False: 2.06k]
  |  Branch (593:28): [True: 23, False: 3.37k]
  ------------------
  594|  5.45k|        const char* bp = ParseInt(ap, 2, 0, 59, &minutes);
  595|  5.45k|        if (bp != nullptr && bp - ap == 2) {
  ------------------
  |  Branch (595:13): [True: 3.38k, False: 2.07k]
  |  Branch (595:30): [True: 2.45k, False: 935]
  ------------------
  596|  2.45k|          dp = bp;
  597|  2.45k|          if (sep != '\0' && *bp == sep) ++bp;
  ------------------
  |  Branch (597:15): [True: 1.51k, False: 931]
  |  Branch (597:30): [True: 10, False: 1.50k]
  ------------------
  598|  2.45k|          const char* cp = ParseInt(bp, 2, 0, 59, &seconds);
  599|  2.45k|          if (cp != nullptr && cp - bp == 2) dp = cp;
  ------------------
  |  Branch (599:15): [True: 963, False: 1.48k]
  |  Branch (599:32): [True: 563, False: 400]
  ------------------
  600|  2.45k|        }
  601|  5.45k|        *offset = ((hours * 60 + minutes) * 60) + seconds;
  602|  5.45k|        if (first == '-') *offset = -*offset;
  ------------------
  |  Branch (602:13): [True: 3.91k, False: 1.54k]
  ------------------
  603|  5.45k|      } else {
  604|     42|        dp = nullptr;
  605|     42|      }
  606|  5.50k|    } else if (first == 'Z' || first == 'z') {  // Zulu
  ------------------
  |  Branch (606:16): [True: 513, False: 920]
  |  Branch (606:32): [True: 851, False: 69]
  ------------------
  607|  1.36k|      *offset = 0;
  608|  1.36k|    } else {
  609|     69|      dp = nullptr;
  610|     69|    }
  611|  6.93k|  }
  612|  6.93k|  return dp;
  613|  6.93k|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_19ParseZoneEPKcPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  615|    626|const char* ParseZone(const char* dp, std::string* zone) {
  616|    626|  zone->clear();
  617|    626|  if (dp != nullptr) {
  ------------------
  |  Branch (617:7): [True: 626, False: 0]
  ------------------
  618|  1.05M|    while (*dp != '\0' && !std::isspace(*dp)) zone->push_back(*dp++);
  ------------------
  |  Branch (618:12): [True: 1.05M, False: 125]
  |  Branch (618:27): [True: 1.05M, False: 501]
  ------------------
  619|    626|    if (zone->empty()) dp = nullptr;
  ------------------
  |  Branch (619:9): [True: 22, False: 604]
  ------------------
  620|    626|  }
  621|    626|  return dp;
  622|    626|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_115ParseSubSecondsEPKcPNSt3__16chrono8durationIlNS4_5ratioILl1ELl1000000000000000EEEEE:
  624|  1.80k|const char* ParseSubSeconds(const char* dp, detail::femtoseconds* subseconds) {
  625|  1.80k|  if (dp != nullptr) {
  ------------------
  |  Branch (625:7): [True: 1.80k, False: 0]
  ------------------
  626|  1.80k|    std::int_fast64_t v = 0;
  627|  1.80k|    std::int_fast64_t exp = 0;
  628|  1.80k|    const char* const bp = dp;
  629|  5.13k|    while (const char* cp = strchr(kDigits, *dp)) {
  ------------------
  |  Branch (629:24): [True: 3.37k, False: 1.75k]
  ------------------
  630|  3.37k|      int d = static_cast<int>(cp - kDigits);
  631|  3.37k|      if (d >= 10) break;
  ------------------
  |  Branch (631:11): [True: 49, False: 3.33k]
  ------------------
  632|  3.33k|      if (exp < 15) {
  ------------------
  |  Branch (632:11): [True: 3.00k, False: 325]
  ------------------
  633|  3.00k|        exp += 1;
  634|  3.00k|        v *= 10;
  635|  3.00k|        v += d;
  636|  3.00k|      }
  637|  3.33k|      ++dp;
  638|  3.33k|    }
  639|  1.80k|    if (dp != bp) {
  ------------------
  |  Branch (639:9): [True: 1.79k, False: 4]
  ------------------
  640|  1.79k|      v *= kExp10[15 - exp];
  641|  1.79k|      *subseconds = detail::femtoseconds(v);
  642|  1.79k|    } else {
  643|      4|      dp = nullptr;
  644|      4|    }
  645|  1.80k|  }
  646|  1.80k|  return dp;
  647|  1.80k|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_17ParseTMEPKcS3_P2tm:
  650|  1.27k|const char* ParseTM(const char* dp, const char* fmt, std::tm* tm) {
  651|  1.27k|  if (dp != nullptr) {
  ------------------
  |  Branch (651:7): [True: 1.27k, False: 0]
  ------------------
  652|  1.27k|    dp = strptime(dp, fmt, tm);
  653|  1.27k|  }
  654|  1.27k|  return dp;
  655|  1.27k|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_18FromWeekEiNS0_7weekdayEPlP2tm:
  660|    282|bool FromWeek(int week_num, weekday week_start, year_t* year, std::tm* tm) {
  661|    282|  const civil_year y(*year % 400);
  662|    282|  civil_day cd = prev_weekday(y, week_start);  // week 0
  663|    282|  cd = next_weekday(cd - 1, FromTmWday(tm->tm_wday)) + (week_num * 7);
  664|    282|  if (const year_t shift = cd.year() - y.year()) {
  ------------------
  |  Branch (664:20): [True: 170, False: 112]
  ------------------
  665|    170|    if (shift > 0) {
  ------------------
  |  Branch (665:9): [True: 36, False: 134]
  ------------------
  666|     36|      if (*year > std::numeric_limits<year_t>::max() - shift) return false;
  ------------------
  |  Branch (666:11): [True: 1, False: 35]
  ------------------
  667|    134|    } else {
  668|    134|      if (*year < std::numeric_limits<year_t>::min() - shift) return false;
  ------------------
  |  Branch (668:11): [True: 1, False: 133]
  ------------------
  669|    134|    }
  670|    168|    *year += shift;
  671|    168|  }
  672|    280|  tm->tm_mon = cd.month() - 1;
  673|    280|  tm->tm_mday = cd.day();
  674|    280|  return true;
  675|    282|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_110FromTmWdayEi:
   90|    282|weekday FromTmWday(int tm_wday) {
   91|    282|  switch (tm_wday) {
  ------------------
  |  Branch (91:11): [True: 282, False: 0]
  ------------------
   92|      7|    case 0:
  ------------------
  |  Branch (92:5): [True: 7, False: 275]
  ------------------
   93|      7|      return weekday::sunday;
   94|     14|    case 1:
  ------------------
  |  Branch (94:5): [True: 14, False: 268]
  ------------------
   95|     14|      return weekday::monday;
   96|      1|    case 2:
  ------------------
  |  Branch (96:5): [True: 1, False: 281]
  ------------------
   97|      1|      return weekday::tuesday;
   98|      3|    case 3:
  ------------------
  |  Branch (98:5): [True: 3, False: 279]
  ------------------
   99|      3|      return weekday::wednesday;
  100|    248|    case 4:
  ------------------
  |  Branch (100:5): [True: 248, False: 34]
  ------------------
  101|    248|      return weekday::thursday;
  102|      4|    case 5:
  ------------------
  |  Branch (102:5): [True: 4, False: 278]
  ------------------
  103|      4|      return weekday::friday;
  104|      5|    case 6:
  ------------------
  |  Branch (104:5): [True: 5, False: 277]
  ------------------
  105|      5|      return weekday::saturday;
  106|    282|  }
  107|      0|  return weekday::sunday; /*NOTREACHED*/
  108|    282|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_18ParseIntIiEEPKcS4_iT_S5_PS5_:
  227|  38.6k|const char* ParseInt(const char* dp, int width, T min, T max, T* vp) {
  228|  38.6k|  if (dp != nullptr) {
  ------------------
  |  Branch (228:7): [True: 37.8k, False: 794]
  ------------------
  229|  37.8k|    const T kmin = std::numeric_limits<T>::min();
  230|  37.8k|    bool erange = false;
  231|  37.8k|    bool neg = false;
  232|  37.8k|    T value = 0;
  233|  37.8k|    if (*dp == '-') {
  ------------------
  |  Branch (233:9): [True: 2.40k, False: 35.4k]
  ------------------
  234|  2.40k|      neg = true;
  235|  2.40k|      if (width <= 0 || --width != 0) {
  ------------------
  |  Branch (235:11): [True: 217, False: 2.18k]
  |  Branch (235:25): [True: 2.18k, False: 0]
  ------------------
  236|  2.40k|        ++dp;
  237|  2.40k|      } else {
  238|      0|        dp = nullptr;  // width was 1
  239|      0|      }
  240|  2.40k|    }
  241|  37.8k|    if (const char* const bp = dp) {
  ------------------
  |  Branch (241:27): [True: 37.8k, False: 0]
  ------------------
  242|   161k|      while (const char* cp = strchr(kDigits, *dp)) {
  ------------------
  |  Branch (242:26): [True: 143k, False: 17.8k]
  ------------------
  243|   143k|        int d = static_cast<int>(cp - kDigits);
  244|   143k|        if (d >= 10) break;
  ------------------
  |  Branch (244:13): [True: 1.66k, False: 141k]
  ------------------
  245|   141k|        if (value < kmin / 10) {
  ------------------
  |  Branch (245:13): [True: 4.38k, False: 137k]
  ------------------
  246|  4.38k|          erange = true;
  247|  4.38k|          break;
  248|  4.38k|        }
  249|   137k|        value *= 10;
  250|   137k|        if (value < kmin + d) {
  ------------------
  |  Branch (250:13): [True: 437, False: 137k]
  ------------------
  251|    437|          erange = true;
  252|    437|          break;
  253|    437|        }
  254|   137k|        value -= d;
  255|   137k|        dp += 1;
  256|   137k|        if (width > 0 && --width == 0) break;
  ------------------
  |  Branch (256:13): [True: 27.6k, False: 109k]
  |  Branch (256:26): [True: 13.5k, False: 14.1k]
  ------------------
  257|   137k|      }
  258|  37.8k|      if (dp != bp && !erange && (neg || value != kmin)) {
  ------------------
  |  Branch (258:11): [True: 36.4k, False: 1.40k]
  |  Branch (258:23): [True: 31.5k, False: 4.82k]
  |  Branch (258:35): [True: 2.37k, False: 29.2k]
  |  Branch (258:42): [True: 27.7k, False: 1.45k]
  ------------------
  259|  30.1k|        if (!neg || value != 0) {
  ------------------
  |  Branch (259:13): [True: 27.7k, False: 2.37k]
  |  Branch (259:21): [True: 991, False: 1.38k]
  ------------------
  260|  28.7k|          if (!neg) value = -value;  // make positive
  ------------------
  |  Branch (260:15): [True: 27.7k, False: 991]
  ------------------
  261|  28.7k|          if (min <= value && value <= max) {
  ------------------
  |  Branch (261:15): [True: 27.7k, False: 997]
  |  Branch (261:31): [True: 23.0k, False: 4.72k]
  ------------------
  262|  23.0k|            *vp = value;
  263|  23.0k|          } else {
  264|  5.72k|            dp = nullptr;
  265|  5.72k|          }
  266|  28.7k|        } else {
  267|  1.38k|          dp = nullptr;
  268|  1.38k|        }
  269|  30.1k|      } else {
  270|  7.69k|        dp = nullptr;
  271|  7.69k|      }
  272|  37.8k|    }
  273|  37.8k|  }
  274|  38.6k|  return dp;
  275|  38.6k|}
time_zone_format.cc:_ZN4cctz6detail12_GLOBAL__N_18ParseIntIlEEPKcS4_iT_S5_PS5_:
  227|  3.42k|const char* ParseInt(const char* dp, int width, T min, T max, T* vp) {
  228|  3.42k|  if (dp != nullptr) {
  ------------------
  |  Branch (228:7): [True: 3.42k, False: 0]
  ------------------
  229|  3.42k|    const T kmin = std::numeric_limits<T>::min();
  230|  3.42k|    bool erange = false;
  231|  3.42k|    bool neg = false;
  232|  3.42k|    T value = 0;
  233|  3.42k|    if (*dp == '-') {
  ------------------
  |  Branch (233:9): [True: 1.60k, False: 1.82k]
  ------------------
  234|  1.60k|      neg = true;
  235|  1.60k|      if (width <= 0 || --width != 0) {
  ------------------
  |  Branch (235:11): [True: 1.55k, False: 45]
  |  Branch (235:25): [True: 45, False: 0]
  ------------------
  236|  1.60k|        ++dp;
  237|  1.60k|      } else {
  238|      0|        dp = nullptr;  // width was 1
  239|      0|      }
  240|  1.60k|    }
  241|  3.42k|    if (const char* const bp = dp) {
  ------------------
  |  Branch (241:27): [True: 3.42k, False: 0]
  ------------------
  242|  33.2k|      while (const char* cp = strchr(kDigits, *dp)) {
  ------------------
  |  Branch (242:26): [True: 32.4k, False: 827]
  ------------------
  243|  32.4k|        int d = static_cast<int>(cp - kDigits);
  244|  32.4k|        if (d >= 10) break;
  ------------------
  |  Branch (244:13): [True: 2.26k, False: 30.1k]
  ------------------
  245|  30.1k|        if (value < kmin / 10) {
  ------------------
  |  Branch (245:13): [True: 144, False: 30.0k]
  ------------------
  246|    144|          erange = true;
  247|    144|          break;
  248|    144|        }
  249|  30.0k|        value *= 10;
  250|  30.0k|        if (value < kmin + d) {
  ------------------
  |  Branch (250:13): [True: 3, False: 29.9k]
  ------------------
  251|      3|          erange = true;
  252|      3|          break;
  253|      3|        }
  254|  29.9k|        value -= d;
  255|  29.9k|        dp += 1;
  256|  29.9k|        if (width > 0 && --width == 0) break;
  ------------------
  |  Branch (256:13): [True: 792, False: 29.2k]
  |  Branch (256:26): [True: 184, False: 608]
  ------------------
  257|  29.9k|      }
  258|  3.42k|      if (dp != bp && !erange && (neg || value != kmin)) {
  ------------------
  |  Branch (258:11): [True: 3.34k, False: 85]
  |  Branch (258:23): [True: 3.19k, False: 147]
  |  Branch (258:35): [True: 1.58k, False: 1.60k]
  |  Branch (258:42): [True: 1.60k, False: 3]
  ------------------
  259|  3.19k|        if (!neg || value != 0) {
  ------------------
  |  Branch (259:13): [True: 1.60k, False: 1.58k]
  |  Branch (259:21): [True: 1.57k, False: 7]
  ------------------
  260|  3.18k|          if (!neg) value = -value;  // make positive
  ------------------
  |  Branch (260:15): [True: 1.60k, False: 1.57k]
  ------------------
  261|  3.18k|          if (min <= value && value <= max) {
  ------------------
  |  Branch (261:15): [True: 3.18k, False: 0]
  |  Branch (261:31): [True: 3.18k, False: 0]
  ------------------
  262|  3.18k|            *vp = value;
  263|  3.18k|          } else {
  264|      0|            dp = nullptr;
  265|      0|          }
  266|  3.18k|        } else {
  267|      7|          dp = nullptr;
  268|      7|        }
  269|  3.19k|      } else {
  270|    235|        dp = nullptr;
  271|    235|      }
  272|  3.42k|    }
  273|  3.42k|  }
  274|  3.42k|  return dp;
  275|  3.42k|}

_ZN4cctz10TimeZoneIf3UTCEv:
   21|      1|std::unique_ptr<TimeZoneIf> TimeZoneIf::UTC() {
   22|      1|  return TimeZoneInfo::UTC();
   23|      1|}
_ZN4cctz10TimeZoneIf4MakeERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   25|  1.18k|std::unique_ptr<TimeZoneIf> TimeZoneIf::Make(const std::string& name) {
   26|       |  // Support "libc:localtime" and "libc:*" to access the legacy
   27|       |  // localtime and UTC support respectively from the C library.
   28|       |  // NOTE: The "libc:*" zones are internal, test-only interfaces, and
   29|       |  // are subject to change/removal without notice. Do not use them.
   30|  1.18k|  if (name.compare(0, 5, "libc:") == 0) {
  ------------------
  |  Branch (30:7): [True: 232, False: 956]
  ------------------
   31|    232|    return TimeZoneLibC::Make(name.substr(5));
   32|    232|  }
   33|       |
   34|       |  // Otherwise use the "zoneinfo" implementation.
   35|    956|  return TimeZoneInfo::Make(name);
   36|  1.18k|}
_ZN4cctz10TimeZoneIfD2Ev:
   39|    509|TimeZoneIf::~TimeZoneIf() {}

_ZN4cctz13ToUnixSecondsERKNSt3__16chrono10time_pointINS1_12system_clockENS1_8durationIlNS0_5ratioILl1ELl1EEEEEEE:
   61|  11.5k|inline std::int_fast64_t ToUnixSeconds(const time_point<seconds>& tp) {
   62|  11.5k|  return (tp - std::chrono::time_point_cast<seconds>(
   63|  11.5k|                   std::chrono::system_clock::from_time_t(0))).count();
   64|  11.5k|}
_ZN4cctz15FromUnixSecondsEl:
   65|  13.5k|inline time_point<seconds> FromUnixSeconds(std::int_fast64_t t) {
   66|  13.5k|  return std::chrono::time_point_cast<seconds>(
   67|  13.5k|             std::chrono::system_clock::from_time_t(0)) + seconds(t);
   68|  13.5k|}
_ZN4cctz10TimeZoneIfC2Ev:
   52|  1.18k|  TimeZoneIf() = default;

_ZN4cctz9time_zone4Impl3UTCEv:
   45|    170|time_zone time_zone::Impl::UTC() {
   46|    170|  return time_zone(UTCImpl());
   47|    170|}
_ZN4cctz9time_zone4Impl12LoadTimeZoneERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPS0_:
   49|  8.99k|bool time_zone::Impl::LoadTimeZone(const std::string& name, time_zone* tz) {
   50|  8.99k|  const Impl* const utc_impl = UTCImpl();
   51|       |
   52|       |  // Check for UTC (which is never a key in time_zone_map).
   53|  8.99k|  auto offset = seconds::zero();
   54|  8.99k|  if (FixedOffsetFromName(name, &offset) && offset == seconds::zero()) {
  ------------------
  |  Branch (54:7): [True: 1.87k, False: 7.12k]
  |  Branch (54:7): [True: 1.48k, False: 7.50k]
  |  Branch (54:45): [True: 1.48k, False: 385]
  ------------------
   55|  1.48k|    *tz = time_zone(utc_impl);
   56|  1.48k|    return true;
   57|  1.48k|  }
   58|       |
   59|       |  // Check whether the time zone has already been loaded.
   60|  7.50k|  {
   61|  7.50k|    std::lock_guard<std::mutex> lock(TimeZoneMutex());
   62|  7.50k|    if (time_zone_map != nullptr) {
  ------------------
  |  Branch (62:9): [True: 7.50k, False: 1]
  ------------------
   63|  7.50k|      TimeZoneImplByName::const_iterator itr = time_zone_map->find(name);
   64|  7.50k|      if (itr != time_zone_map->end()) {
  ------------------
  |  Branch (64:11): [True: 6.31k, False: 1.18k]
  ------------------
   65|  6.31k|        *tz = time_zone(itr->second);
   66|  6.31k|        return itr->second != utc_impl;
   67|  6.31k|      }
   68|  7.50k|    }
   69|  7.50k|  }
   70|       |
   71|       |  // Load the new time zone (outside the lock).
   72|  1.18k|  std::unique_ptr<const Impl> new_impl(new Impl(name));
   73|       |
   74|       |  // Add the new time zone to the map.
   75|  1.18k|  std::lock_guard<std::mutex> lock(TimeZoneMutex());
   76|  1.18k|  if (time_zone_map == nullptr) time_zone_map = new TimeZoneImplByName;
  ------------------
  |  Branch (76:7): [True: 1, False: 1.18k]
  ------------------
   77|  1.18k|  if (!new_impl->zone_) {
  ------------------
  |  Branch (77:7): [True: 509, False: 679]
  ------------------
   78|       |    // Load failed, but a successful insertion may have happened concurrently.
   79|       |    // Check it now that we have the lock. Otherwise, avoid caching negative
   80|       |    // entries to avoid unbounded growth and DoS attacks.
   81|    509|    auto itr = time_zone_map->find(name);
   82|    509|    const Impl* impl = (itr != time_zone_map->end()) ? itr->second : utc_impl;
  ------------------
  |  Branch (82:24): [True: 0, False: 509]
  ------------------
   83|    509|    *tz = time_zone(impl);
   84|    509|    return impl != utc_impl;
   85|    509|  }
   86|    679|  const Impl*& impl = (*time_zone_map)[name];
   87|    679|  if (impl == nullptr) {  // this thread won any load race
  ------------------
  |  Branch (87:7): [True: 679, False: 0]
  ------------------
   88|    679|    impl = new_impl.release();
   89|    679|  }
   90|    679|  *tz = time_zone(impl);
   91|    679|  return impl != utc_impl;
   92|  1.18k|}
_ZN4cctz9time_zone4ImplC2Ev:
  109|      1|time_zone::Impl::Impl() : name_("UTC"), zone_(TimeZoneIf::UTC()) {}
_ZN4cctz9time_zone4ImplC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  112|  1.18k|    : name_(name), zone_(TimeZoneIf::Make(name_)) {}
_ZN4cctz9time_zone4Impl7UTCImplEv:
  114|  9.16k|const time_zone::Impl* time_zone::Impl::UTCImpl() {
  115|  9.16k|  static const Impl* utc_impl = new Impl;
  116|  9.16k|  return utc_impl;
  117|  9.16k|}
time_zone_impl.cc:_ZN4cctz12_GLOBAL__N_113TimeZoneMutexEv:
   36|  8.69k|std::mutex& TimeZoneMutex() {
   37|       |  // This mutex is intentionally "leaked" to avoid the static deinitialization
   38|       |  // order fiasco (std::mutex's destructor is not trivial on many platforms).
   39|  8.69k|  static std::mutex* time_zone_mutex = new std::mutex;
   40|  8.69k|  return *time_zone_mutex;
   41|  8.69k|}

_ZNK4cctz9time_zone4Impl9BreakTimeERKNSt3__16chrono10time_pointINS3_12system_clockENS3_8durationIlNS2_5ratioILl1ELl1EEEEEEE:
   49|  9.22k|  time_zone::absolute_lookup BreakTime(const time_point<seconds>& tp) const {
   50|  9.22k|    return zone_->BreakTime(tp);
   51|  9.22k|  }
_ZNK4cctz9time_zone4Impl8MakeTimeERKNS_6detail10civil_timeINS2_10second_tagEEE:
   56|  13.8k|  time_zone::civil_lookup MakeTime(const civil_second& cs) const {
   57|  13.8k|    return zone_->MakeTime(cs);
   58|  13.8k|  }

_ZN4cctz12TimeZoneInfo17GetTransitionTypeElbRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPh:
  264|    192|                                     std::uint_least8_t* index) {
  265|    192|  std::size_t type_index = 0;
  266|    192|  std::size_t abbr_index = abbreviations_.size();
  267|    291|  for (; type_index != transition_types_.size(); ++type_index) {
  ------------------
  |  Branch (267:10): [True: 291, False: 0]
  ------------------
  268|    291|    const TransitionType& tt(transition_types_[type_index]);
  269|    291|    const char* tt_abbr = &abbreviations_[tt.abbr_index];
  270|    291|    if (tt_abbr == abbr) abbr_index = tt.abbr_index;
  ------------------
  |  Branch (270:9): [True: 192, False: 99]
  ------------------
  271|    291|    if (tt.utc_offset == utc_offset && tt.is_dst == is_dst) {
  ------------------
  |  Branch (271:9): [True: 201, False: 90]
  |  Branch (271:40): [True: 198, False: 3]
  ------------------
  272|    198|      if (abbr_index == tt.abbr_index) break;  // reuse
  ------------------
  |  Branch (272:11): [True: 192, False: 6]
  ------------------
  273|    198|    }
  274|    291|  }
  275|    192|  if (type_index > 255 || abbr_index > 255) {
  ------------------
  |  Branch (275:7): [True: 0, False: 192]
  |  Branch (275:27): [True: 0, False: 192]
  ------------------
  276|       |    // No index space (8 bits) available for a new type or abbreviation.
  277|      0|    return false;
  278|      0|  }
  279|    192|  if (type_index == transition_types_.size()) {
  ------------------
  |  Branch (279:7): [True: 0, False: 192]
  ------------------
  280|      0|    TransitionType& tt(*transition_types_.emplace(transition_types_.end()));
  281|      0|    tt.utc_offset = static_cast<std::int_least32_t>(utc_offset);
  282|      0|    tt.is_dst = is_dst;
  283|      0|    if (abbr_index == abbreviations_.size()) {
  ------------------
  |  Branch (283:9): [True: 0, False: 0]
  ------------------
  284|      0|      abbreviations_.append(abbr);
  285|      0|      abbreviations_.append(1, '\0');
  286|      0|    }
  287|      0|    tt.abbr_index = static_cast<std::uint_least8_t>(abbr_index);
  288|      0|  }
  289|    192|  *index = static_cast<std::uint_least8_t>(type_index);
  290|    192|  return true;
  291|    192|}
_ZNK4cctz12TimeZoneInfo16EquivTransitionsEhh:
  297|     66|                                    std::uint_fast8_t tt2_index) const {
  298|     66|  if (tt1_index == tt2_index) return true;
  ------------------
  |  Branch (298:7): [True: 66, False: 0]
  ------------------
  299|      0|  const TransitionType& tt1(transition_types_[tt1_index]);
  300|      0|  const TransitionType& tt2(transition_types_[tt2_index]);
  301|      0|  if (tt1.utc_offset != tt2.utc_offset) return false;
  ------------------
  |  Branch (301:7): [True: 0, False: 0]
  ------------------
  302|      0|  if (tt1.is_dst != tt2.is_dst) return false;
  ------------------
  |  Branch (302:7): [True: 0, False: 0]
  ------------------
  303|      0|  if (tt1.abbr_index != tt2.abbr_index) return false;
  ------------------
  |  Branch (303:7): [True: 0, False: 0]
  ------------------
  304|      0|  return true;
  305|      0|}
_ZN4cctz12TimeZoneInfo17ExtendTransitionsEv:
  309|    129|bool TimeZoneInfo::ExtendTransitions() {
  310|    129|  extended_ = false;
  311|    129|  if (future_spec_.empty()) return true;  // last transition prevails
  ------------------
  |  Branch (311:7): [True: 0, False: 129]
  ------------------
  312|       |
  313|    129|  PosixTimeZone posix;
  314|    129|  if (!ParsePosixSpec(future_spec_, &posix)) return false;
  ------------------
  |  Branch (314:7): [True: 0, False: 129]
  ------------------
  315|       |
  316|       |  // Find transition type for the future std specification.
  317|    129|  std::uint_least8_t std_ti;
  318|    129|  if (!GetTransitionType(posix.std_offset, false, posix.std_abbr, &std_ti))
  ------------------
  |  Branch (318:7): [True: 0, False: 129]
  ------------------
  319|      0|    return false;
  320|       |
  321|    129|  if (posix.dst_abbr.empty()) {  // std only
  ------------------
  |  Branch (321:7): [True: 66, False: 63]
  ------------------
  322|       |    // The future specification should match the last transition, and
  323|       |    // that means that handling the future will fall out naturally.
  324|     66|    return EquivTransitions(transitions_.back().type_index, std_ti);
  325|     66|  }
  326|       |
  327|       |  // Find transition type for the future dst specification.
  328|     63|  std::uint_least8_t dst_ti;
  329|     63|  if (!GetTransitionType(posix.dst_offset, true, posix.dst_abbr, &dst_ti))
  ------------------
  |  Branch (329:7): [True: 0, False: 63]
  ------------------
  330|      0|    return false;
  331|       |
  332|     63|  if (AllYearDST(posix)) {  // dst only
  ------------------
  |  Branch (332:7): [True: 0, False: 63]
  ------------------
  333|       |    // The future specification should match the last transition, and
  334|       |    // that means that handling the future will fall out naturally.
  335|      0|    return EquivTransitions(transitions_.back().type_index, dst_ti);
  336|      0|  }
  337|       |
  338|       |  // Extend the transitions for an additional 401 years using the future
  339|       |  // specification. Years beyond those can be handled by mapping back to
  340|       |  // a cycle-equivalent year within that range. Note that we need 401
  341|       |  // (well, at least the first transition in the 401st year) so that the
  342|       |  // end of the 400th year is mapped back to an extended year. And first
  343|       |  // we may also need two additional transitions for the current year.
  344|     63|  transitions_.reserve(transitions_.size() + 2 + 401 * 2);
  345|     63|  extended_ = true;
  346|       |
  347|     63|  const Transition& last(transitions_.back());
  348|     63|  const std::int_fast64_t last_time = last.unix_time;
  349|     63|  const TransitionType& last_tt(transition_types_[last.type_index]);
  350|     63|  last_year_ = LocalTime(last_time, last_tt).cs.year();
  351|     63|  bool leap_year = IsLeap(last_year_);
  352|     63|  const civil_second jan1(last_year_);
  353|     63|  std::int_fast64_t jan1_time = jan1 - civil_second();
  354|     63|  int jan1_weekday = ToPosixWeekday(get_weekday(jan1));
  355|       |
  356|     63|  Transition dst = {0, dst_ti, civil_second(), civil_second()};
  357|     63|  Transition std = {0, std_ti, civil_second(), civil_second()};
  358|  25.3k|  for (const year_t limit = last_year_ + 401;; ++last_year_) {
  359|  25.3k|    auto dst_trans_off = TransOffset(leap_year, jan1_weekday, posix.dst_start);
  360|  25.3k|    auto std_trans_off = TransOffset(leap_year, jan1_weekday, posix.dst_end);
  361|  25.3k|    dst.unix_time = jan1_time + dst_trans_off - posix.std_offset;
  362|  25.3k|    std.unix_time = jan1_time + std_trans_off - posix.dst_offset;
  363|  25.3k|    const auto* ta = dst.unix_time < std.unix_time ? &dst : &std;
  ------------------
  |  Branch (363:22): [True: 25.3k, False: 0]
  ------------------
  364|  25.3k|    const auto* tb = dst.unix_time < std.unix_time ? &std : &dst;
  ------------------
  |  Branch (364:22): [True: 25.3k, False: 0]
  ------------------
  365|  25.3k|    if (last_time < tb->unix_time) {
  ------------------
  |  Branch (365:9): [True: 25.2k, False: 63]
  ------------------
  366|  25.2k|      if (last_time < ta->unix_time) transitions_.push_back(*ta);
  ------------------
  |  Branch (366:11): [True: 25.2k, False: 0]
  ------------------
  367|  25.2k|      transitions_.push_back(*tb);
  368|  25.2k|    }
  369|  25.3k|    if (last_year_ == limit) break;
  ------------------
  |  Branch (369:9): [True: 63, False: 25.2k]
  ------------------
  370|  25.2k|    jan1_time += kSecsPerYear[leap_year];
  371|  25.2k|    jan1_weekday = (jan1_weekday + kDaysPerYear[leap_year]) % 7;
  372|  25.2k|    leap_year = !leap_year && IsLeap(last_year_ + 1);
  ------------------
  |  Branch (372:17): [True: 19.1k, False: 6.11k]
  |  Branch (372:31): [True: 6.11k, False: 13.0k]
  ------------------
  373|  25.2k|  }
  374|       |
  375|     63|  return true;
  376|     63|}
_ZN4cctz12TimeZoneInfo17ResetToBuiltinUTCERKNSt3__16chrono8durationIlNS1_5ratioILl1ELl1EEEEE:
  584|    319|bool TimeZoneInfo::ResetToBuiltinUTC(const seconds& offset) {
  585|    319|  transition_types_.resize(1);
  586|    319|  TransitionType& tt(transition_types_.back());
  587|    319|  tt.utc_offset = static_cast<std::int_least32_t>(offset.count());
  588|    319|  tt.is_dst = false;
  589|    319|  tt.abbr_index = 0;
  590|       |
  591|       |  // We temporarily add some redundant, contemporary (2015 through 2025)
  592|       |  // transitions for performance reasons.  See TimeZoneInfo::LocalTime().
  593|       |  // TODO: Fix the performance issue and remove the extra transitions.
  594|    319|  transitions_.clear();
  595|    319|  transitions_.reserve(12);
  596|    319|  for (const std::int_fast64_t unix_time : {
  ------------------
  |  Branch (596:42): [True: 3.82k, False: 319]
  ------------------
  597|    319|           -(1LL << 59),  // a "first half" transition
  598|    319|           1420070400LL,  // 2015-01-01T00:00:00+00:00
  599|    319|           1451606400LL,  // 2016-01-01T00:00:00+00:00
  600|    319|           1483228800LL,  // 2017-01-01T00:00:00+00:00
  601|    319|           1514764800LL,  // 2018-01-01T00:00:00+00:00
  602|    319|           1546300800LL,  // 2019-01-01T00:00:00+00:00
  603|    319|           1577836800LL,  // 2020-01-01T00:00:00+00:00
  604|    319|           1609459200LL,  // 2021-01-01T00:00:00+00:00
  605|    319|           1640995200LL,  // 2022-01-01T00:00:00+00:00
  606|    319|           1672531200LL,  // 2023-01-01T00:00:00+00:00
  607|    319|           1704067200LL,  // 2024-01-01T00:00:00+00:00
  608|    319|           1735689600LL,  // 2025-01-01T00:00:00+00:00
  609|  3.82k|       }) {
  610|  3.82k|    Transition& tr(*transitions_.emplace(transitions_.end()));
  611|  3.82k|    tr.unix_time = unix_time;
  612|  3.82k|    tr.type_index = 0;
  613|  3.82k|    tr.civil_sec = LocalTime(tr.unix_time, tt).cs;
  614|  3.82k|    tr.prev_civil_sec = tr.civil_sec - 1;
  615|  3.82k|  }
  616|       |
  617|    319|  default_transition_type_ = 0;
  618|    319|  abbreviations_ = FixedOffsetToAbbr(offset);
  619|    319|  abbreviations_.append(1, '\0');
  620|    319|  future_spec_.clear();  // never needed for a fixed-offset zone
  621|    319|  extended_ = false;
  622|       |
  623|    319|  tt.civil_max = LocalTime(seconds::max().count(), tt).cs;
  624|    319|  tt.civil_min = LocalTime(seconds::min().count(), tt).cs;
  625|       |
  626|    319|  transitions_.shrink_to_fit();
  627|    319|  return true;
  628|    319|}
_ZN4cctz12TimeZoneInfo4LoadEPNS_14ZoneInfoSourceE:
  630|    159|bool TimeZoneInfo::Load(ZoneInfoSource* zip) {
  631|       |  // Read and validate the header.
  632|    159|  tzhead tzh;
  633|    159|  if (zip->Read(&tzh, sizeof(tzh)) != sizeof(tzh))
  ------------------
  |  Branch (633:7): [True: 29, False: 130]
  ------------------
  634|     29|    return false;
  635|    130|  if (strncmp(tzh.tzh_magic, TZ_MAGIC, sizeof(tzh.tzh_magic)) != 0)
  ------------------
  |  |   27|    130|#define TZ_MAGIC "TZif"
  ------------------
  |  Branch (635:7): [True: 1, False: 129]
  ------------------
  636|      1|    return false;
  637|    129|  Header hdr;
  638|    129|  if (!hdr.Build(tzh))
  ------------------
  |  Branch (638:7): [True: 0, False: 129]
  ------------------
  639|      0|    return false;
  640|    129|  std::size_t time_len = 4;
  641|    129|  if (tzh.tzh_version[0] != '\0') {
  ------------------
  |  Branch (641:7): [True: 129, False: 0]
  ------------------
  642|       |    // Skip the 4-byte data.
  643|    129|    if (zip->Skip(hdr.DataLength(time_len)) != 0)
  ------------------
  |  Branch (643:9): [True: 0, False: 129]
  ------------------
  644|      0|      return false;
  645|       |    // Read and validate the header for the 8-byte data.
  646|    129|    if (zip->Read(&tzh, sizeof(tzh)) != sizeof(tzh))
  ------------------
  |  Branch (646:9): [True: 0, False: 129]
  ------------------
  647|      0|      return false;
  648|    129|    if (strncmp(tzh.tzh_magic, TZ_MAGIC, sizeof(tzh.tzh_magic)) != 0)
  ------------------
  |  |   27|    129|#define TZ_MAGIC "TZif"
  ------------------
  |  Branch (648:9): [True: 0, False: 129]
  ------------------
  649|      0|      return false;
  650|    129|    if (tzh.tzh_version[0] == '\0')
  ------------------
  |  Branch (650:9): [True: 0, False: 129]
  ------------------
  651|      0|      return false;
  652|    129|    if (!hdr.Build(tzh))
  ------------------
  |  Branch (652:9): [True: 0, False: 129]
  ------------------
  653|      0|      return false;
  654|    129|    time_len = 8;
  655|    129|  }
  656|    129|  if (hdr.typecnt == 0)
  ------------------
  |  Branch (656:7): [True: 0, False: 129]
  ------------------
  657|      0|    return false;
  658|    129|  if (hdr.leapcnt != 0) {
  ------------------
  |  Branch (658:7): [True: 0, False: 129]
  ------------------
  659|       |    // This code assumes 60-second minutes so we do not want
  660|       |    // the leap-second encoded zoneinfo. We could reverse the
  661|       |    // compensation, but the "right" encoding is rarely used
  662|       |    // so currently we simply reject such data.
  663|      0|    return false;
  664|      0|  }
  665|    129|  if (hdr.ttisstdcnt != 0 && hdr.ttisstdcnt != hdr.typecnt)
  ------------------
  |  Branch (665:7): [True: 66, False: 63]
  |  Branch (665:30): [True: 0, False: 66]
  ------------------
  666|      0|    return false;
  667|    129|  if (hdr.ttisutcnt != 0 && hdr.ttisutcnt != hdr.typecnt)
  ------------------
  |  Branch (667:7): [True: 44, False: 85]
  |  Branch (667:29): [True: 0, False: 44]
  ------------------
  668|      0|    return false;
  669|       |
  670|       |  // Bound the header counts before sizing tbuf so that a hostile TZif blob
  671|       |  // cannot force a very large zero-filled allocation from a tiny input.
  672|    129|  if (hdr.timecnt > TZ_MAX_TIMES)
  ------------------
  |  |   94|    129|# define TZ_MAX_TIMES 2000
  ------------------
  |  Branch (672:7): [True: 0, False: 129]
  ------------------
  673|      0|    return false;
  674|    129|  if (hdr.typecnt > TZ_MAX_TYPES)
  ------------------
  |  |   99|    129|# define TZ_MAX_TYPES 256 /* Limited to 256 by Internet RFC 9636.  */
  ------------------
  |  Branch (674:7): [True: 0, False: 129]
  ------------------
  675|      0|    return false;
  676|    129|  if (hdr.charcnt > TZ_MAX_CHARS)
  ------------------
  |  |  104|    129|# define TZ_MAX_CHARS 256	/* Maximum number of abbreviation characters */
  ------------------
  |  Branch (676:7): [True: 0, False: 129]
  ------------------
  677|      0|    return false;
  678|       |
  679|       |  // Read the data into a local buffer.
  680|    129|  std::size_t len = hdr.DataLength(time_len);
  681|    129|  std::vector<char> tbuf(len);
  682|    129|  if (zip->Read(tbuf.data(), len) != len)
  ------------------
  |  Branch (682:7): [True: 0, False: 129]
  ------------------
  683|      0|    return false;
  684|    129|  const char* bp = tbuf.data();
  685|       |
  686|       |  // Decode and validate the transitions.
  687|    129|  transitions_.reserve(hdr.timecnt + 2);
  688|    129|  transitions_.resize(hdr.timecnt);
  689|  8.36k|  for (std::size_t i = 0; i != hdr.timecnt; ++i) {
  ------------------
  |  Branch (689:27): [True: 8.24k, False: 129]
  ------------------
  690|  8.24k|    transitions_[i].unix_time = (time_len == 4) ? Decode32(bp) : Decode64(bp);
  ------------------
  |  Branch (690:33): [True: 0, False: 8.24k]
  ------------------
  691|  8.24k|    bp += time_len;
  692|  8.24k|    if (i != 0) {
  ------------------
  |  Branch (692:9): [True: 8.17k, False: 66]
  ------------------
  693|       |      // Check that the transitions are ordered by time (as zic guarantees).
  694|  8.17k|      if (!Transition::ByUnixTime()(transitions_[i - 1], transitions_[i]))
  ------------------
  |  Branch (694:11): [True: 0, False: 8.17k]
  ------------------
  695|      0|        return false;  // out of order
  696|  8.17k|    }
  697|  8.24k|  }
  698|    129|  bool seen_type_0 = false;
  699|  8.36k|  for (std::size_t i = 0; i != hdr.timecnt; ++i) {
  ------------------
  |  Branch (699:27): [True: 8.24k, False: 129]
  ------------------
  700|  8.24k|    transitions_[i].type_index = Decode8(bp++);
  701|  8.24k|    if (transitions_[i].type_index >= hdr.typecnt)
  ------------------
  |  Branch (701:9): [True: 0, False: 8.24k]
  ------------------
  702|      0|      return false;
  703|  8.24k|    if (transitions_[i].type_index == 0)
  ------------------
  |  Branch (703:9): [True: 2.74k, False: 5.49k]
  ------------------
  704|  2.74k|      seen_type_0 = true;
  705|  8.24k|  }
  706|       |
  707|       |  // Decode and validate the transition types.
  708|    129|  transition_types_.reserve(hdr.typecnt + 2);
  709|    129|  transition_types_.resize(hdr.typecnt);
  710|    486|  for (std::size_t i = 0; i != hdr.typecnt; ++i) {
  ------------------
  |  Branch (710:27): [True: 357, False: 129]
  ------------------
  711|    357|    transition_types_[i].utc_offset =
  712|    357|        static_cast<std::int_least32_t>(Decode32(bp));
  713|    357|    if (transition_types_[i].utc_offset >= kSecsPerDay ||
  ------------------
  |  Branch (713:9): [True: 0, False: 357]
  ------------------
  714|    357|        transition_types_[i].utc_offset <= -kSecsPerDay)
  ------------------
  |  Branch (714:9): [True: 0, False: 357]
  ------------------
  715|      0|      return false;
  716|    357|    bp += 4;
  717|    357|    transition_types_[i].is_dst = (Decode8(bp++) != 0);
  718|    357|    transition_types_[i].abbr_index = Decode8(bp++);
  719|    357|    if (transition_types_[i].abbr_index >= hdr.charcnt)
  ------------------
  |  Branch (719:9): [True: 0, False: 357]
  ------------------
  720|      0|      return false;
  721|    357|  }
  722|       |
  723|       |  // Determine the before-first-transition type.
  724|    129|  default_transition_type_ = 0;
  725|    129|  if (seen_type_0 && hdr.timecnt != 0) {
  ------------------
  |  Branch (725:7): [True: 63, False: 66]
  |  Branch (725:22): [True: 63, False: 0]
  ------------------
  726|     63|    std::size_t index = 0;
  727|     63|    if (transition_types_[0].is_dst) {
  ------------------
  |  Branch (727:9): [True: 0, False: 63]
  ------------------
  728|      0|      index = transitions_[0].type_index;
  729|      0|      while (index != 0 && transition_types_[index].is_dst)
  ------------------
  |  Branch (729:14): [True: 0, False: 0]
  |  Branch (729:28): [True: 0, False: 0]
  ------------------
  730|      0|        --index;
  731|      0|    }
  732|     63|    while (index != hdr.typecnt && transition_types_[index].is_dst)
  ------------------
  |  Branch (732:12): [True: 63, False: 0]
  |  Branch (732:36): [True: 0, False: 63]
  ------------------
  733|      0|      ++index;
  734|     63|    if (index != hdr.typecnt)
  ------------------
  |  Branch (734:9): [True: 63, False: 0]
  ------------------
  735|     63|      default_transition_type_ = static_cast<std::uint_fast8_t>(index);
  736|     63|  }
  737|       |
  738|       |  // Copy all the abbreviations.
  739|    129|  abbreviations_.reserve(hdr.charcnt + 10);
  740|    129|  abbreviations_.assign(bp, hdr.charcnt);
  741|    129|  bp += hdr.charcnt;
  742|       |
  743|       |  // Skip the unused portions. We've already dispensed with leap-second
  744|       |  // encoded zoneinfo. The ttisstd/ttisgmt indicators only apply when
  745|       |  // interpreting a POSIX spec that does not include start/end rules, and
  746|       |  // that isn't the case here (see "zic -p").
  747|    129|  bp += (time_len + 4) * hdr.leapcnt;  // leap-time + TAI-UTC
  748|    129|  bp += 1 * hdr.ttisstdcnt;            // UTC/local indicators
  749|    129|  bp += 1 * hdr.ttisutcnt;             // standard/wall indicators
  750|    129|  assert(bp == tbuf.data() + tbuf.size());
  ------------------
  |  Branch (750:3): [True: 129, False: 0]
  ------------------
  751|       |
  752|    129|  future_spec_.clear();
  753|    129|  if (tzh.tzh_version[0] != '\0') {
  ------------------
  |  Branch (753:7): [True: 129, False: 0]
  ------------------
  754|       |    // Snarf up the NL-enclosed future POSIX spec. Note
  755|       |    // that version '3' files utilize an extended format.
  756|    129|    auto get_char = [](ZoneInfoSource* azip) -> int {
  757|    129|      unsigned char ch;  // all non-EOF results are positive
  758|    129|      return (azip->Read(&ch, 1) == 1) ? ch : EOF;
  759|    129|    };
  760|    129|    if (get_char(zip) != '\n')
  ------------------
  |  Branch (760:9): [True: 0, False: 129]
  ------------------
  761|      0|      return false;
  762|  2.02k|    for (int c = get_char(zip); c != '\n'; c = get_char(zip)) {
  ------------------
  |  Branch (762:33): [True: 1.89k, False: 129]
  ------------------
  763|  1.89k|      if (c == EOF)
  ------------------
  |  Branch (763:11): [True: 0, False: 1.89k]
  ------------------
  764|      0|        return false;
  765|  1.89k|      future_spec_.push_back(static_cast<char>(c));
  766|  1.89k|    }
  767|    129|  }
  768|       |
  769|       |  // We don't check for EOF so that we're forwards compatible.
  770|       |
  771|       |  // If we did not find version information during the standard loading
  772|       |  // process (as of tzh_version '3' that is unsupported), then ask the
  773|       |  // ZoneInfoSource for any out-of-bound version string it may be privy to.
  774|    129|  if (version_.empty()) {
  ------------------
  |  Branch (774:7): [True: 129, False: 0]
  ------------------
  775|    129|    version_ = zip->Version();
  776|    129|  }
  777|       |
  778|       |  // Ensure that there is always a transition in the first half of the
  779|       |  // time line (the second half is handled below) so that the signed
  780|       |  // difference between a civil_second and the civil_second of its
  781|       |  // previous transition is always representable, without overflow.
  782|    129|  if (transitions_.empty() || transitions_.front().unix_time >= 0) {
  ------------------
  |  Branch (782:7): [True: 63, False: 66]
  |  Branch (782:31): [True: 41, False: 25]
  ------------------
  783|    104|    Transition& tr(*transitions_.emplace(transitions_.begin()));
  784|    104|    tr.unix_time = -(1LL << 59);  // -18267312070-10-26T17:01:52+00:00
  785|    104|    tr.type_index = default_transition_type_;
  786|    104|  }
  787|       |
  788|       |  // Extend the transitions using the future specification.
  789|    129|  if (!ExtendTransitions()) return false;
  ------------------
  |  Branch (789:7): [True: 0, False: 129]
  ------------------
  790|       |
  791|       |  // Ensure that there is always a transition in the second half of the
  792|       |  // time line (the first half is handled above) so that the signed
  793|       |  // difference between a civil_second and the civil_second of its
  794|       |  // previous transition is always representable, without overflow.
  795|    129|  const Transition& last(transitions_.back());
  796|    129|  if (last.unix_time < 0) {
  ------------------
  |  Branch (796:7): [True: 63, False: 66]
  ------------------
  797|     63|    const std::uint_fast8_t type_index = last.type_index;
  798|     63|    Transition& tr(*transitions_.emplace(transitions_.end()));
  799|     63|    tr.unix_time = 2147483647;  // 2038-01-19T03:14:07+00:00
  800|     63|    tr.type_index = type_index;
  801|     63|  }
  802|       |
  803|       |  // Compute the local civil time for each transition and the preceding
  804|       |  // second. These will be used for reverse conversions in MakeTime().
  805|    129|  const TransitionType* ttp = &transition_types_[default_transition_type_];
  806|  59.0k|  for (std::size_t i = 0; i != transitions_.size(); ++i) {
  ------------------
  |  Branch (806:27): [True: 58.9k, False: 129]
  ------------------
  807|  58.9k|    Transition& tr(transitions_[i]);
  808|  58.9k|    tr.prev_civil_sec = LocalTime(tr.unix_time, *ttp).cs - 1;
  809|  58.9k|    ttp = &transition_types_[tr.type_index];
  810|  58.9k|    tr.civil_sec = LocalTime(tr.unix_time, *ttp).cs;
  811|  58.9k|    if (i != 0) {
  ------------------
  |  Branch (811:9): [True: 58.8k, False: 129]
  ------------------
  812|       |      // Check that the transitions are ordered by civil time. Essentially
  813|       |      // this means that an offset change cannot cross another such change.
  814|       |      // No one does this in practice, and we depend on it in MakeTime().
  815|  58.8k|      if (!Transition::ByCivilTime()(transitions_[i - 1], tr))
  ------------------
  |  Branch (815:11): [True: 0, False: 58.8k]
  ------------------
  816|      0|        return false;  // out of order
  817|  58.8k|    }
  818|  58.9k|  }
  819|       |
  820|       |  // Compute the maximum/minimum civil times that can be converted to a
  821|       |  // time_point<seconds> for each of the zone's transition types.
  822|    357|  for (auto& tt : transition_types_) {
  ------------------
  |  Branch (822:17): [True: 357, False: 129]
  ------------------
  823|    357|    tt.civil_max = LocalTime(seconds::max().count(), tt).cs;
  824|    357|    tt.civil_min = LocalTime(seconds::min().count(), tt).cs;
  825|    357|  }
  826|       |
  827|    129|  transitions_.shrink_to_fit();
  828|    129|  return true;
  829|    129|}
_ZN4cctz12TimeZoneInfo4LoadERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  831|    956|bool TimeZoneInfo::Load(const std::string& name) {
  832|       |  // We can ensure that the loading of UTC or any other fixed-offset
  833|       |  // zone never fails because the simple, fixed-offset state can be
  834|       |  // internally generated. Note that this depends on our choice to not
  835|       |  // accept leap-second encoded ("right") zoneinfo.
  836|    956|  auto offset = seconds::zero();
  837|    956|  if (FixedOffsetFromName(name, &offset)) {
  ------------------
  |  Branch (837:7): [True: 318, False: 638]
  ------------------
  838|    318|    return ResetToBuiltinUTC(offset);
  839|    318|  }
  840|       |
  841|       |  // Find and use a ZoneInfoSource to load the named zone.
  842|    638|  auto zip = cctz_extension::zone_info_source_factory(
  843|    638|      name, [](const std::string& n) -> std::unique_ptr<ZoneInfoSource> {
  844|    638|        if (auto z = FileZoneInfoSource::Open(n)) return z;
  845|    638|        if (auto z = AndroidZoneInfoSource::Open(n)) return z;
  846|    638|        if (auto z = FuchsiaZoneInfoSource::Open(n)) return z;
  847|    638|        return nullptr;
  848|    638|      });
  849|    638|  return zip != nullptr && Load(zip.get());
  ------------------
  |  Branch (849:10): [True: 159, False: 479]
  |  Branch (849:28): [True: 129, False: 30]
  ------------------
  850|    956|}
_ZN4cctz12TimeZoneInfo3UTCEv:
  852|      1|std::unique_ptr<TimeZoneInfo> TimeZoneInfo::UTC() {
  853|      1|  auto tz = std::unique_ptr<TimeZoneInfo>(new TimeZoneInfo);
  854|      1|  tz->ResetToBuiltinUTC(seconds::zero());
  855|      1|  return tz;
  856|      1|}
_ZN4cctz12TimeZoneInfo4MakeERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  858|    956|std::unique_ptr<TimeZoneInfo> TimeZoneInfo::Make(const std::string& name) {
  859|    956|  auto tz = std::unique_ptr<TimeZoneInfo>(new TimeZoneInfo);
  860|    956|  if (!tz->Load(name)) tz.reset();  // fallback to UTC
  ------------------
  |  Branch (860:7): [True: 509, False: 447]
  ------------------
  861|    956|  return tz;
  862|    956|}
_ZNK4cctz12TimeZoneInfo9LocalTimeElRKNS_14TransitionTypeE:
  866|   124k|    std::int_fast64_t unix_time, const TransitionType& tt) const {
  867|       |  // A civil time in "+offset" looks like (time+offset) in UTC.
  868|       |  // Note: We perform two additions in the civil_second domain to
  869|       |  // sidestep the chance of overflow in (unix_time + tt.utc_offset).
  870|   124k|  return {(civil_second() + unix_time) + tt.utc_offset,
  871|   124k|          tt.utc_offset, tt.is_dst, &abbreviations_[tt.abbr_index]};
  872|   124k|}
_ZNK4cctz12TimeZoneInfo9LocalTimeElRKNS_10TransitionE:
  876|  6.58k|    std::int_fast64_t unix_time, const Transition& tr) const {
  877|  6.58k|  const TransitionType& tt = transition_types_[tr.type_index];
  878|       |  // Note: (unix_time - tr.unix_time) will never overflow as we
  879|       |  // have ensured that there is always a "nearby" transition.
  880|  6.58k|  return {tr.civil_sec + (unix_time - tr.unix_time),  // TODO: Optimize.
  881|  6.58k|          tt.utc_offset, tt.is_dst, &abbreviations_[tt.abbr_index]};
  882|  6.58k|}
_ZNK4cctz12TimeZoneInfo9TimeLocalERKNS_6detail10civil_timeINS1_10second_tagEEEl:
  886|  1.51k|                                                year_t c4_shift) const {
  887|  1.51k|  assert(last_year_ - 400 < cs.year() && cs.year() <= last_year_);
  ------------------
  |  Branch (887:3): [True: 1.51k, False: 0]
  |  Branch (887:3): [True: 1.51k, False: 0]
  |  Branch (887:3): [True: 1.51k, False: 0]
  ------------------
  888|  1.51k|  time_zone::civil_lookup cl = MakeTime(cs);
  889|  1.51k|  if (c4_shift > seconds::max().count() / kSecsPer400Years) {
  ------------------
  |  Branch (889:7): [True: 155, False: 1.35k]
  ------------------
  890|    155|    cl.pre = cl.trans = cl.post = time_point<seconds>::max();
  891|  1.35k|  } else {
  892|  1.35k|    const auto offset = seconds(c4_shift * kSecsPer400Years);
  893|  1.35k|    const auto limit = time_point<seconds>::max() - offset;
  894|  4.06k|    for (auto* tp : {&cl.pre, &cl.trans, &cl.post}) {
  ------------------
  |  Branch (894:19): [True: 4.06k, False: 1.35k]
  ------------------
  895|  4.06k|      if (*tp > limit) {
  ------------------
  |  Branch (895:11): [True: 24, False: 4.04k]
  ------------------
  896|     24|        *tp = time_point<seconds>::max();
  897|  4.04k|      } else {
  898|  4.04k|        *tp += offset;
  899|  4.04k|      }
  900|  4.06k|    }
  901|  1.35k|  }
  902|  1.51k|  return cl;
  903|  1.51k|}
_ZNK4cctz12TimeZoneInfo9BreakTimeERKNSt3__16chrono10time_pointINS2_12system_clockENS2_8durationIlNS1_5ratioILl1ELl1EEEEEEE:
  906|  9.11k|    const time_point<seconds>& tp) const {
  907|  9.11k|  std::int_fast64_t unix_time = ToUnixSeconds(tp);
  908|  9.11k|  const std::size_t timecnt = transitions_.size();
  909|  9.11k|  assert(timecnt != 0);  // We always add a transition.
  ------------------
  |  Branch (909:3): [True: 9.11k, False: 0]
  ------------------
  910|       |
  911|  9.11k|  if (unix_time < transitions_[0].unix_time) {
  ------------------
  |  Branch (911:7): [True: 1.16k, False: 7.95k]
  ------------------
  912|  1.16k|    return LocalTime(unix_time, transition_types_[default_transition_type_]);
  913|  1.16k|  }
  914|  7.95k|  if (unix_time >= transitions_[timecnt - 1].unix_time) {
  ------------------
  |  Branch (914:7): [True: 2.62k, False: 5.33k]
  ------------------
  915|       |    // After the last transition. If we extended the transitions using
  916|       |    // future_spec_, shift back to a supported year using the 400-year
  917|       |    // cycle of calendaric equivalence and then compensate accordingly.
  918|  2.62k|    if (extended_) {
  ------------------
  |  Branch (918:9): [True: 1.37k, False: 1.24k]
  ------------------
  919|  1.37k|      const std::int_fast64_t diff =
  920|  1.37k|          unix_time - transitions_[timecnt - 1].unix_time;
  921|  1.37k|      const year_t shift = diff / kSecsPer400Years + 1;
  922|  1.37k|      const auto d = seconds(shift * kSecsPer400Years);
  923|  1.37k|      time_zone::absolute_lookup al = BreakTime(tp - d);
  924|  1.37k|      al.cs = YearShift(al.cs, shift * 400);
  925|  1.37k|      return al;
  926|  1.37k|    }
  927|  1.24k|    return LocalTime(unix_time, transitions_[timecnt - 1]);
  928|  2.62k|  }
  929|       |
  930|  5.33k|  const std::size_t hint = local_time_hint_.load(std::memory_order_relaxed);
  931|  5.33k|  if (0 < hint && hint < timecnt) {
  ------------------
  |  Branch (931:7): [True: 5.10k, False: 232]
  |  Branch (931:19): [True: 5.10k, False: 0]
  ------------------
  932|  5.10k|    if (transitions_[hint - 1].unix_time <= unix_time) {
  ------------------
  |  Branch (932:9): [True: 4.22k, False: 875]
  ------------------
  933|  4.22k|      if (unix_time < transitions_[hint].unix_time) {
  ------------------
  |  Branch (933:11): [True: 3.37k, False: 854]
  ------------------
  934|  3.37k|        return LocalTime(unix_time, transitions_[hint - 1]);
  935|  3.37k|      }
  936|  4.22k|    }
  937|  5.10k|  }
  938|       |
  939|  1.96k|  const Transition target = {unix_time, 0, civil_second(), civil_second()};
  940|  1.96k|  const Transition* begin = &transitions_[0];
  941|  1.96k|  const Transition* tr = std::upper_bound(begin, begin + timecnt, target,
  942|  1.96k|                                          Transition::ByUnixTime());
  943|  1.96k|  local_time_hint_.store(static_cast<std::size_t>(tr - begin),
  944|  1.96k|                         std::memory_order_relaxed);
  945|  1.96k|  return LocalTime(unix_time, *--tr);
  946|  5.33k|}
_ZNK4cctz12TimeZoneInfo8MakeTimeERKNS_6detail10civil_timeINS1_10second_tagEEE:
  948|  13.3k|time_zone::civil_lookup TimeZoneInfo::MakeTime(const civil_second& cs) const {
  949|  13.3k|  const std::size_t timecnt = transitions_.size();
  950|  13.3k|  assert(timecnt != 0);  // We always add a transition.
  ------------------
  |  Branch (950:3): [True: 13.3k, False: 0]
  ------------------
  951|       |
  952|       |  // Find the first transition after our target civil time.
  953|  13.3k|  const Transition* tr = nullptr;
  954|  13.3k|  const Transition* begin = &transitions_[0];
  955|  13.3k|  const Transition* end = begin + timecnt;
  956|  13.3k|  if (cs < begin->civil_sec) {
  ------------------
  |  Branch (956:7): [True: 1.39k, False: 11.9k]
  ------------------
  957|  1.39k|    tr = begin;
  958|  11.9k|  } else if (cs >= transitions_[timecnt - 1].civil_sec) {
  ------------------
  |  Branch (958:14): [True: 2.88k, False: 9.05k]
  ------------------
  959|  2.88k|    tr = end;
  960|  9.05k|  } else {
  961|  9.05k|    const std::size_t hint = time_local_hint_.load(std::memory_order_relaxed);
  962|  9.05k|    if (0 < hint && hint < timecnt) {
  ------------------
  |  Branch (962:9): [True: 8.63k, False: 417]
  |  Branch (962:21): [True: 8.63k, False: 0]
  ------------------
  963|  8.63k|      if (transitions_[hint - 1].civil_sec <= cs) {
  ------------------
  |  Branch (963:11): [True: 7.13k, False: 1.50k]
  ------------------
  964|  7.13k|        if (cs < transitions_[hint].civil_sec) {
  ------------------
  |  Branch (964:13): [True: 5.60k, False: 1.52k]
  ------------------
  965|  5.60k|          tr = begin + hint;
  966|  5.60k|        }
  967|  7.13k|      }
  968|  8.63k|    }
  969|  9.05k|    if (tr == nullptr) {
  ------------------
  |  Branch (969:9): [True: 3.44k, False: 5.60k]
  ------------------
  970|  3.44k|      const Transition target = {0, 0, cs, civil_second()};
  971|  3.44k|      tr = std::upper_bound(begin, end, target, Transition::ByCivilTime());
  972|  3.44k|      time_local_hint_.store(static_cast<std::size_t>(tr - begin),
  973|  3.44k|                             std::memory_order_relaxed);
  974|  3.44k|    }
  975|  9.05k|  }
  976|       |
  977|  13.3k|  if (tr == begin) {
  ------------------
  |  Branch (977:7): [True: 1.39k, False: 11.9k]
  ------------------
  978|  1.39k|    if (tr->prev_civil_sec >= cs) {
  ------------------
  |  Branch (978:9): [True: 1.39k, False: 2]
  ------------------
  979|       |      // Before first transition, so use the default offset.
  980|  1.39k|      const TransitionType& tt(transition_types_[default_transition_type_]);
  981|  1.39k|      if (cs < tt.civil_min) return MakeUnique(time_point<seconds>::min());
  ------------------
  |  Branch (981:11): [True: 167, False: 1.22k]
  ------------------
  982|  1.22k|      return MakeUnique(cs - (civil_second() + tt.utc_offset));
  983|  1.39k|    }
  984|       |    // tr->prev_civil_sec < cs < tr->civil_sec
  985|      2|    return MakeSkipped(*tr, cs);
  986|  1.39k|  }
  987|       |
  988|  11.9k|  if (tr == end) {
  ------------------
  |  Branch (988:7): [True: 2.88k, False: 9.05k]
  ------------------
  989|  2.88k|    if (cs > (--tr)->prev_civil_sec) {
  ------------------
  |  Branch (989:9): [True: 2.88k, False: 4]
  ------------------
  990|       |      // After the last transition. If we extended the transitions using
  991|       |      // future_spec_, shift back to a supported year using the 400-year
  992|       |      // cycle of calendaric equivalence and then compensate accordingly.
  993|  2.88k|      if (extended_ && cs.year() > last_year_) {
  ------------------
  |  Branch (993:11): [True: 1.52k, False: 1.36k]
  |  Branch (993:24): [True: 1.51k, False: 12]
  ------------------
  994|  1.51k|        const year_t shift = (cs.year() - last_year_ - 1) / 400 + 1;
  995|  1.51k|        return TimeLocal(YearShift(cs, shift * -400), shift);
  996|  1.51k|      }
  997|  1.37k|      const TransitionType& tt(transition_types_[tr->type_index]);
  998|  1.37k|      if (cs > tt.civil_max) return MakeUnique(time_point<seconds>::max());
  ------------------
  |  Branch (998:11): [True: 61, False: 1.31k]
  ------------------
  999|  1.31k|      return MakeUnique(tr->unix_time + (cs - tr->civil_sec));
 1000|  1.37k|    }
 1001|       |    // tr->civil_sec <= cs <= tr->prev_civil_sec
 1002|      4|    return MakeRepeated(*tr, cs);
 1003|  2.88k|  }
 1004|       |
 1005|  9.05k|  if (tr->prev_civil_sec < cs) {
  ------------------
  |  Branch (1005:7): [True: 8, False: 9.04k]
  ------------------
 1006|       |    // tr->prev_civil_sec < cs < tr->civil_sec
 1007|      8|    return MakeSkipped(*tr, cs);
 1008|      8|  }
 1009|       |
 1010|  9.04k|  if (cs <= (--tr)->prev_civil_sec) {
  ------------------
  |  Branch (1010:7): [True: 17, False: 9.03k]
  ------------------
 1011|       |    // tr->civil_sec <= cs <= tr->prev_civil_sec
 1012|     17|    return MakeRepeated(*tr, cs);
 1013|     17|  }
 1014|       |
 1015|       |  // In between transitions.
 1016|  9.03k|  return MakeUnique(tr->unix_time + (cs - tr->civil_sec));
 1017|  9.04k|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_110AllYearDSTERKNS_13PosixTimeZoneE:
  180|     63|bool AllYearDST(const PosixTimeZone& posix) {
  181|     63|  if (posix.dst_start.date.fmt != PosixTransition::N) return false;
  ------------------
  |  Branch (181:7): [True: 63, False: 0]
  ------------------
  182|      0|  if (posix.dst_start.date.n.day != 0) return false;
  ------------------
  |  Branch (182:7): [True: 0, False: 0]
  ------------------
  183|      0|  if (posix.dst_start.time.offset != 0) return false;
  ------------------
  |  Branch (183:7): [True: 0, False: 0]
  ------------------
  184|       |
  185|      0|  if (posix.dst_end.date.fmt != PosixTransition::J) return false;
  ------------------
  |  Branch (185:7): [True: 0, False: 0]
  ------------------
  186|      0|  if (posix.dst_end.date.j.day != kDaysPerYear[0]) return false;
  ------------------
  |  Branch (186:7): [True: 0, False: 0]
  ------------------
  187|      0|  const auto offset = posix.std_offset - posix.dst_offset;
  188|      0|  if (posix.dst_end.time.offset + offset != kSecsPerDay) return false;
  ------------------
  |  Branch (188:7): [True: 0, False: 0]
  ------------------
  189|       |
  190|      0|  return true;
  191|      0|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_16IsLeapEl:
   59|  19.2k|inline bool IsLeap(year_t year) {
   60|  19.2k|  return (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0);
  ------------------
  |  Branch (60:10): [True: 6.30k, False: 12.9k]
  |  Branch (60:30): [True: 6.04k, False: 252]
  |  Branch (60:51): [True: 63, False: 189]
  ------------------
   61|  19.2k|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_114ToPosixWeekdayENS_6detail7weekdayE:
   86|     63|inline int ToPosixWeekday(weekday wd) {
   87|     63|  switch (wd) {
  ------------------
  |  Branch (87:11): [True: 63, False: 0]
  ------------------
   88|      0|    case weekday::sunday:
  ------------------
  |  Branch (88:5): [True: 0, False: 63]
  ------------------
   89|      0|      return 0;
   90|      0|    case weekday::monday:
  ------------------
  |  Branch (90:5): [True: 0, False: 63]
  ------------------
   91|      0|      return 1;
   92|      0|    case weekday::tuesday:
  ------------------
  |  Branch (92:5): [True: 0, False: 63]
  ------------------
   93|      0|      return 2;
   94|      0|    case weekday::wednesday:
  ------------------
  |  Branch (94:5): [True: 0, False: 63]
  ------------------
   95|      0|      return 3;
   96|     63|    case weekday::thursday:
  ------------------
  |  Branch (96:5): [True: 63, False: 0]
  ------------------
   97|     63|      return 4;
   98|      0|    case weekday::friday:
  ------------------
  |  Branch (98:5): [True: 0, False: 63]
  ------------------
   99|      0|      return 5;
  100|      0|    case weekday::saturday:
  ------------------
  |  Branch (100:5): [True: 0, False: 63]
  ------------------
  101|      0|      return 6;
  102|     63|  }
  103|      0|  return 0; /*NOTREACHED*/
  104|     63|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_111TransOffsetEbiRKNS_15PosixTransitionE:
  195|  50.6k|                              const PosixTransition& pt) {
  196|  50.6k|  std::int_fast64_t days = 0;
  197|  50.6k|  switch (pt.date.fmt) {
  ------------------
  |  Branch (197:11): [True: 50.6k, False: 0]
  ------------------
  198|      0|    case PosixTransition::J: {
  ------------------
  |  Branch (198:5): [True: 0, False: 50.6k]
  ------------------
  199|      0|      days = pt.date.j.day;
  200|      0|      if (!leap_year || days < kMonthOffsets[1][3]) days -= 1;
  ------------------
  |  Branch (200:11): [True: 0, False: 0]
  |  Branch (200:25): [True: 0, False: 0]
  ------------------
  201|      0|      break;
  202|      0|    }
  203|      0|    case PosixTransition::N: {
  ------------------
  |  Branch (203:5): [True: 0, False: 50.6k]
  ------------------
  204|      0|      days = pt.date.n.day;
  205|      0|      break;
  206|      0|    }
  207|  50.6k|    case PosixTransition::M: {
  ------------------
  |  Branch (207:5): [True: 50.6k, False: 0]
  ------------------
  208|  50.6k|      const bool last_week = (pt.date.m.week == 5);
  209|  50.6k|      days = kMonthOffsets[leap_year][pt.date.m.month + last_week];
  210|  50.6k|      const std::int_fast64_t weekday = (jan1_weekday + days) % 7;
  211|  50.6k|      if (last_week) {
  ------------------
  |  Branch (211:11): [True: 48.2k, False: 2.41k]
  ------------------
  212|  48.2k|        days -= (weekday + 7 - 1 - pt.date.m.weekday) % 7 + 1;
  213|  48.2k|      } else {
  214|  2.41k|        days += (pt.date.m.weekday + 7 - weekday) % 7;
  215|  2.41k|        days += (pt.date.m.week - 1) * 7;
  216|  2.41k|      }
  217|  50.6k|      break;
  218|      0|    }
  219|  50.6k|  }
  220|  50.6k|  return (days * kSecsPerDay) + pt.time.offset;
  221|  50.6k|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_16Header5BuildERK6tzhead:
  148|    258|bool Header::Build(const tzhead& tzh) {
  149|    258|  std::int_fast32_t v;
  150|    258|  if ((v = Decode32(tzh.tzh_timecnt)) < 0) return false;
  ------------------
  |  Branch (150:7): [True: 0, False: 258]
  ------------------
  151|    258|  timecnt = static_cast<std::size_t>(v);
  152|    258|  if ((v = Decode32(tzh.tzh_typecnt)) < 0) return false;
  ------------------
  |  Branch (152:7): [True: 0, False: 258]
  ------------------
  153|    258|  typecnt = static_cast<std::size_t>(v);
  154|    258|  if ((v = Decode32(tzh.tzh_charcnt)) < 0) return false;
  ------------------
  |  Branch (154:7): [True: 0, False: 258]
  ------------------
  155|    258|  charcnt = static_cast<std::size_t>(v);
  156|    258|  if ((v = Decode32(tzh.tzh_leapcnt)) < 0) return false;
  ------------------
  |  Branch (156:7): [True: 0, False: 258]
  ------------------
  157|    258|  leapcnt = static_cast<std::size_t>(v);
  158|    258|  if ((v = Decode32(tzh.tzh_ttisstdcnt)) < 0) return false;
  ------------------
  |  Branch (158:7): [True: 0, False: 258]
  ------------------
  159|    258|  ttisstdcnt = static_cast<std::size_t>(v);
  160|    258|  if ((v = Decode32(tzh.tzh_ttisutcnt)) < 0) return false;
  ------------------
  |  Branch (160:7): [True: 0, False: 258]
  ------------------
  161|    258|  ttisutcnt = static_cast<std::size_t>(v);
  162|    258|  return true;
  163|    258|}
time_zone_info.cc:_ZNK4cctz12_GLOBAL__N_16Header10DataLengthEm:
  167|    258|std::size_t Header::DataLength(std::size_t time_len) const {
  168|    258|  std::size_t len = 0;
  169|    258|  len += (time_len + 1) * timecnt;  // unix_time + type_index
  170|    258|  len += (4 + 1 + 1) * typecnt;     // utc_offset + is_dst + abbr_index
  171|    258|  len += 1 * charcnt;               // abbreviations
  172|    258|  len += (time_len + 4) * leapcnt;  // leap-time + TAI-UTC
  173|    258|  len += 1 * ttisstdcnt;            // UTC/local indicators
  174|    258|  len += 1 * ttisutcnt;             // standard/wall indicators
  175|    258|  return len;
  176|    258|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_18Decode32EPKc:
  117|  1.90k|std::int_fast32_t Decode32(const char* cp) {
  118|  1.90k|  std::uint_fast32_t v = 0;
  119|  9.52k|  for (int i = 0; i != (32 / 8); ++i) v = (v << 8) | Decode8(cp++);
  ------------------
  |  Branch (119:19): [True: 7.62k, False: 1.90k]
  ------------------
  120|  1.90k|  const std::int_fast32_t s32max = 0x7fffffff;
  121|  1.90k|  const auto s32maxU = static_cast<std::uint_fast32_t>(s32max);
  122|  1.90k|  if (v <= s32maxU) return static_cast<std::int_fast32_t>(v);
  ------------------
  |  Branch (122:7): [True: 1.86k, False: 36]
  ------------------
  123|     36|  return static_cast<std::int_fast32_t>(v - s32maxU - 1) - s32max - 1;
  124|  1.90k|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_18Decode64EPKc:
  126|  8.24k|std::int_fast64_t Decode64(const char* cp) {
  127|  8.24k|  std::uint_fast64_t v = 0;
  128|  74.1k|  for (int i = 0; i != (64 / 8); ++i) v = (v << 8) | Decode8(cp++);
  ------------------
  |  Branch (128:19): [True: 65.9k, False: 8.24k]
  ------------------
  129|  8.24k|  const std::int_fast64_t s64max = 0x7fffffffffffffff;
  130|  8.24k|  const auto s64maxU = static_cast<std::uint_fast64_t>(s64max);
  131|  8.24k|  if (v <= s64maxU) return static_cast<std::int_fast64_t>(v);
  ------------------
  |  Branch (131:7): [True: 7.90k, False: 332]
  ------------------
  132|    332|  return static_cast<std::int_fast64_t>(v - s64maxU - 1) - s64max - 1;
  133|  8.24k|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_17Decode8EPKc:
  107|  82.4k|inline std::uint_fast8_t Decode8(const char* cp) {
  108|  82.4k|  return static_cast<std::uint_fast8_t>(*cp) & 0xff;
  109|  82.4k|}
time_zone_info.cc:_ZZN4cctz12TimeZoneInfo4LoadEPNS_14ZoneInfoSourceEENK3$_0clES2_:
  756|  2.15k|    auto get_char = [](ZoneInfoSource* azip) -> int {
  757|  2.15k|      unsigned char ch;  // all non-EOF results are positive
  758|  2.15k|      return (azip->Read(&ch, 1) == 1) ? ch : EOF;
  ------------------
  |  Branch (758:14): [True: 2.15k, False: 0]
  ------------------
  759|  2.15k|    };
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_19YearShiftERKNS_6detail10civil_timeINS1_10second_tagEEEl:
  254|  2.88k|inline civil_second YearShift(const civil_second& cs, year_t shift) {
  255|  2.88k|  return civil_second(cs.year() + shift, cs.month(), cs.day(),
  256|  2.88k|                      cs.hour(), cs.minute(), cs.second());
  257|  2.88k|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_110MakeUniqueERKNSt3__16chrono10time_pointINS2_12system_clockENS2_8durationIlNS1_5ratioILl1ELl1EEEEEEE:
  223|  11.7k|inline time_zone::civil_lookup MakeUnique(const time_point<seconds>& tp) {
  224|  11.7k|  time_zone::civil_lookup cl;
  225|  11.7k|  cl.kind = time_zone::civil_lookup::UNIQUE;
  226|  11.7k|  cl.pre = cl.trans = cl.post = tp;
  227|  11.7k|  return cl;
  228|  11.7k|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_110MakeUniqueEl:
  230|  11.5k|inline time_zone::civil_lookup MakeUnique(std::int_fast64_t unix_time) {
  231|  11.5k|  return MakeUnique(FromUnixSeconds(unix_time));
  232|  11.5k|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_111MakeSkippedERKNS_10TransitionERKNS_6detail10civil_timeINS4_10second_tagEEE:
  235|     10|                                           const civil_second& cs) {
  236|     10|  time_zone::civil_lookup cl;
  237|     10|  cl.kind = time_zone::civil_lookup::SKIPPED;
  238|     10|  cl.pre = FromUnixSeconds(tr.unix_time - 1 + (cs - tr.prev_civil_sec));
  239|     10|  cl.trans = FromUnixSeconds(tr.unix_time);
  240|     10|  cl.post = FromUnixSeconds(tr.unix_time - (tr.civil_sec - cs));
  241|     10|  return cl;
  242|     10|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_112MakeRepeatedERKNS_10TransitionERKNS_6detail10civil_timeINS4_10second_tagEEE:
  245|     21|                                            const civil_second& cs) {
  246|     21|  time_zone::civil_lookup cl;
  247|     21|  cl.kind = time_zone::civil_lookup::REPEATED;
  248|     21|  cl.pre = FromUnixSeconds(tr.unix_time - 1 - (tr.prev_civil_sec - cs));
  249|     21|  cl.trans = FromUnixSeconds(tr.unix_time);
  250|     21|  cl.post = FromUnixSeconds(tr.unix_time + (cs - tr.civil_sec));
  251|     21|  return cl;
  252|     21|}
time_zone_info.cc:_ZZN4cctz12TimeZoneInfo4LoadERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEENK3$_0clES9_:
  843|    638|      name, [](const std::string& n) -> std::unique_ptr<ZoneInfoSource> {
  844|    638|        if (auto z = FileZoneInfoSource::Open(n)) return z;
  ------------------
  |  Branch (844:18): [True: 159, False: 479]
  ------------------
  845|    479|        if (auto z = AndroidZoneInfoSource::Open(n)) return z;
  ------------------
  |  Branch (845:18): [True: 0, False: 479]
  ------------------
  846|    479|        if (auto z = FuchsiaZoneInfoSource::Open(n)) return z;
  ------------------
  |  Branch (846:18): [True: 0, False: 479]
  ------------------
  847|    479|        return nullptr;
  848|    479|      });
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_118FileZoneInfoSource4OpenERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  427|    638|    const std::string& name) {
  428|       |  // Use of the "file:" prefix is intended for testing purposes only.
  429|    638|  const std::size_t pos = (name.compare(0, 5, "file:") == 0) ? 5 : 0;
  ------------------
  |  Branch (429:27): [True: 9, False: 629]
  ------------------
  430|       |
  431|       |  // Map the time-zone name to a path name.
  432|    638|  std::string path;
  433|    638|  if (pos == name.size() || name[pos] != '/') {
  ------------------
  |  Branch (433:7): [True: 14, False: 624]
  |  Branch (433:29): [True: 618, False: 6]
  ------------------
  434|    632|    const char* tzdir = "/usr/share/zoneinfo";
  435|    632|    char* tzdir_env = nullptr;
  436|       |#if defined(_MSC_VER)
  437|       |    _dupenv_s(&tzdir_env, nullptr, "TZDIR");
  438|       |#else
  439|    632|    tzdir_env = std::getenv("TZDIR");
  440|    632|#endif
  441|    632|    if (tzdir_env && *tzdir_env) tzdir = tzdir_env;
  ------------------
  |  Branch (441:9): [True: 0, False: 632]
  |  Branch (441:22): [True: 0, False: 0]
  ------------------
  442|    632|    path += tzdir;
  443|    632|    path += '/';
  444|       |#if defined(_MSC_VER)
  445|       |    free(tzdir_env);
  446|       |#endif
  447|    632|  }
  448|    638|  path.append(name, pos, std::string::npos);
  449|       |
  450|       |  // Open the zoneinfo file.
  451|    638|  auto fp = FOpen(path.c_str(), "rb");
  452|    638|  if (fp == nullptr) return nullptr;
  ------------------
  |  Branch (452:7): [True: 479, False: 159]
  ------------------
  453|    159|  return std::unique_ptr<ZoneInfoSource>(new FileZoneInfoSource(std::move(fp)));
  454|    638|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_15FOpenEPKcS2_:
  383|  3.97k|inline FilePtr FOpen(const char* path, const char* mode) {
  384|       |#if defined(_MSC_VER)
  385|       |  FILE* fp;
  386|       |  if (fopen_s(&fp, path, mode) != 0) fp = nullptr;
  387|       |  return FilePtr(fp, fclose);
  388|       |#else
  389|       |  // TODO: Enable the close-on-exec flag.
  390|  3.97k|  return FilePtr(fopen(path, mode), fclose);
  391|  3.97k|#endif
  392|  3.97k|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_118FileZoneInfoSourceC2ENSt3__110unique_ptrI8_IO_FILEPFiPS4_EEEm:
  419|    159|      : fp_(std::move(fp)), len_(len) {}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_118FileZoneInfoSource4ReadEPvm:
  399|  2.56k|  std::size_t Read(void* ptr, std::size_t size) override {
  400|  2.56k|    size = std::min(size, len_);
  401|  2.56k|    std::size_t nread = fread(ptr, 1, size, fp_.get());
  402|  2.56k|    len_ -= nread;
  403|  2.56k|    return nread;
  404|  2.56k|  }
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_118FileZoneInfoSource4SkipEm:
  405|    129|  int Skip(std::size_t offset) override {
  406|    129|    offset = std::min(offset, len_);
  407|    129|    int rc = fseek(fp_.get(), static_cast<long>(offset), SEEK_CUR);
  408|    129|    if (rc == 0) len_ -= offset;
  ------------------
  |  Branch (408:9): [True: 129, False: 0]
  ------------------
  409|    129|    return rc;
  410|    129|  }
time_zone_info.cc:_ZNK4cctz12_GLOBAL__N_118FileZoneInfoSource7VersionEv:
  411|    129|  std::string Version() const override {
  412|       |    // TODO: It would nice if the zoneinfo data included the tzdb version.
  413|    129|    return std::string();
  414|    129|  }
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_121AndroidZoneInfoSource4OpenERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  469|    479|    const std::string& name) {
  470|       |  // Use of the "file:" prefix is intended for testing purposes only.
  471|    479|  const std::size_t pos = (name.compare(0, 5, "file:") == 0) ? 5 : 0;
  ------------------
  |  Branch (471:27): [True: 6, False: 473]
  ------------------
  472|       |
  473|       |  // See Android's libc/tzcode/bionic.cpp for additional information.
  474|    479|  for (const char* tzdata : {"/apex/com.android.tzdata/etc/tz/tzdata",
  ------------------
  |  Branch (474:27): [True: 1.43k, False: 479]
  ------------------
  475|    479|                             "/data/misc/zoneinfo/current/tzdata",
  476|  1.43k|                             "/system/usr/share/zoneinfo/tzdata"}) {
  477|  1.43k|    auto fp = FOpen(tzdata, "rb");
  478|  1.43k|    if (fp == nullptr) continue;
  ------------------
  |  Branch (478:9): [True: 1.43k, False: 0]
  ------------------
  479|       |
  480|      0|    char hbuf[24];  // covers header.zonetab_offset too
  481|      0|    if (fread(hbuf, 1, sizeof(hbuf), fp.get()) != sizeof(hbuf)) continue;
  ------------------
  |  Branch (481:9): [True: 0, False: 0]
  ------------------
  482|      0|    if (strncmp(hbuf, "tzdata", 6) != 0) continue;
  ------------------
  |  Branch (482:9): [True: 0, False: 0]
  ------------------
  483|      0|    const char* vers = (hbuf[11] == '\0') ? hbuf + 6 : "";
  ------------------
  |  Branch (483:24): [True: 0, False: 0]
  ------------------
  484|      0|    const std::int_fast32_t index_offset = Decode32(hbuf + 12);
  485|      0|    const std::int_fast32_t data_offset = Decode32(hbuf + 16);
  486|      0|    if (index_offset < 0 || data_offset < index_offset) continue;
  ------------------
  |  Branch (486:9): [True: 0, False: 0]
  |  Branch (486:29): [True: 0, False: 0]
  ------------------
  487|      0|    if (fseek(fp.get(), static_cast<long>(index_offset), SEEK_SET) != 0)
  ------------------
  |  Branch (487:9): [True: 0, False: 0]
  ------------------
  488|      0|      continue;
  489|       |
  490|      0|    char ebuf[52];  // covers entry.unused too
  491|      0|    const std::size_t index_size =
  492|      0|        static_cast<std::size_t>(data_offset - index_offset);
  493|      0|    const std::size_t zonecnt = index_size / sizeof(ebuf);
  494|      0|    if (zonecnt * sizeof(ebuf) != index_size) continue;
  ------------------
  |  Branch (494:9): [True: 0, False: 0]
  ------------------
  495|      0|    for (std::size_t i = 0; i != zonecnt; ++i) {
  ------------------
  |  Branch (495:29): [True: 0, False: 0]
  ------------------
  496|      0|      if (fread(ebuf, 1, sizeof(ebuf), fp.get()) != sizeof(ebuf)) break;
  ------------------
  |  Branch (496:11): [True: 0, False: 0]
  ------------------
  497|      0|      const std::int_fast32_t start = data_offset + Decode32(ebuf + 40);
  498|      0|      const std::int_fast32_t length = Decode32(ebuf + 44);
  499|      0|      if (start < 0 || length < 0) break;
  ------------------
  |  Branch (499:11): [True: 0, False: 0]
  |  Branch (499:24): [True: 0, False: 0]
  ------------------
  500|      0|      ebuf[40] = '\0';  // ensure zone name is NUL terminated
  501|      0|      if (strcmp(name.c_str() + pos, ebuf) == 0) {
  ------------------
  |  Branch (501:11): [True: 0, False: 0]
  ------------------
  502|      0|        if (fseek(fp.get(), static_cast<long>(start), SEEK_SET) != 0) break;
  ------------------
  |  Branch (502:13): [True: 0, False: 0]
  ------------------
  503|      0|        return std::unique_ptr<ZoneInfoSource>(new AndroidZoneInfoSource(
  504|      0|            std::move(fp), static_cast<std::size_t>(length), vers));
  505|      0|      }
  506|      0|    }
  507|      0|  }
  508|       |
  509|    479|  return nullptr;
  510|    479|}
time_zone_info.cc:_ZN4cctz12_GLOBAL__N_121FuchsiaZoneInfoSource4OpenERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  532|    479|    const std::string& name) {
  533|       |  // Use of the "file:" prefix is intended for testing purposes only.
  534|    479|  const std::size_t pos = (name.compare(0, 5, "file:") == 0) ? 5 : 0;
  ------------------
  |  Branch (534:27): [True: 6, False: 473]
  ------------------
  535|       |
  536|       |  // Prefixes where a Fuchsia component might find zoneinfo files,
  537|       |  // in descending order of preference.
  538|    479|  const auto kTzdataPrefixes = {
  539|       |      // The tzdata from `config-data`.
  540|    479|      "/config/data/tzdata/",
  541|       |      // The tzdata bundled in the component's package.
  542|    479|      "/pkg/data/tzdata/",
  543|       |      // General data storage.
  544|    479|      "/data/tzdata/",
  545|       |      // The recommended path for routed-in tzdata files.
  546|       |      // See for details:
  547|       |      // https://fuchsia.dev/fuchsia-src/concepts/process/namespaces?hl=en#typical_directory_structure
  548|    479|      "/config/tzdata/",
  549|    479|  };
  550|    479|  const auto kEmptyPrefix = {""};
  551|    479|  const bool name_absolute = (pos != name.size() && name[pos] == '/');
  ------------------
  |  Branch (551:31): [True: 479, False: 0]
  |  Branch (551:53): [True: 5, False: 474]
  ------------------
  552|    479|  const auto prefixes = name_absolute ? kEmptyPrefix : kTzdataPrefixes;
  ------------------
  |  Branch (552:25): [True: 5, False: 474]
  ------------------
  553|       |
  554|       |  // Fuchsia builds place zoneinfo files at "<prefix><format><name>".
  555|  1.90k|  for (const std::string prefix : prefixes) {
  ------------------
  |  Branch (555:33): [True: 1.90k, False: 479]
  ------------------
  556|  1.90k|    std::string path = prefix;
  557|  1.90k|    if (!prefix.empty()) path += "zoneinfo/tzif2/";  // format
  ------------------
  |  Branch (557:9): [True: 1.89k, False: 5]
  ------------------
  558|  1.90k|    path.append(name, pos, std::string::npos);
  559|       |
  560|  1.90k|    auto fp = FOpen(path.c_str(), "rb");
  561|  1.90k|    if (fp == nullptr) continue;
  ------------------
  |  Branch (561:9): [True: 1.90k, False: 0]
  ------------------
  562|       |
  563|      0|    std::string version;
  564|      0|    if (!prefix.empty()) {
  ------------------
  |  Branch (564:9): [True: 0, False: 0]
  ------------------
  565|       |      // Fuchsia builds place the version in "<prefix>revision.txt".
  566|      0|      std::ifstream version_stream(prefix + "revision.txt");
  567|      0|      if (version_stream.is_open()) {
  ------------------
  |  Branch (567:11): [True: 0, False: 0]
  ------------------
  568|       |        // revision.txt should contain no newlines, but to be
  569|       |        // defensive we read just the first line.
  570|      0|        std::getline(version_stream, version);
  571|      0|      }
  572|      0|    }
  573|       |
  574|      0|    return std::unique_ptr<ZoneInfoSource>(
  575|      0|        new FuchsiaZoneInfoSource(std::move(fp), std::move(version)));
  576|  1.90k|  }
  577|       |
  578|    479|  return nullptr;
  579|    479|}

_ZNK4cctz10Transition10ByUnixTimeclERKS0_S3_:
   41|  25.9k|    inline bool operator()(const Transition& lhs, const Transition& rhs) const {
   42|  25.9k|      return lhs.unix_time < rhs.unix_time;
   43|  25.9k|    }
_ZNK4cctz10Transition11ByCivilTimeclERKS0_S3_:
   46|  89.2k|    inline bool operator()(const Transition& lhs, const Transition& rhs) const {
   47|  89.2k|      return lhs.civil_sec < rhs.civil_sec;
   48|  89.2k|    }
_ZN4cctz12TimeZoneInfoC2Ev:
   81|    957|  TimeZoneInfo() = default;

_ZN4cctz12TimeZoneLibC4MakeERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  194|    232|std::unique_ptr<TimeZoneLibC> TimeZoneLibC::Make(const std::string& name) {
  195|    232|  return std::unique_ptr<TimeZoneLibC>(new TimeZoneLibC(name));
  196|    232|}
_ZNK4cctz12TimeZoneLibC9BreakTimeERKNSt3__16chrono10time_pointINS2_12system_clockENS2_8durationIlNS1_5ratioILl1ELl1EEEEEEE:
  199|  1.48k|    const time_point<seconds>& tp) const {
  200|  1.48k|  time_zone::absolute_lookup al;
  201|  1.48k|  al.offset = 0;
  202|  1.48k|  al.is_dst = false;
  203|  1.48k|  al.abbr = "-00";
  204|       |
  205|  1.48k|  const std::int_fast64_t s = ToUnixSeconds(tp);
  206|       |
  207|       |  // If std::time_t cannot hold the input we saturate the output.
  208|  1.48k|  if (s < std::numeric_limits<std::time_t>::min()) {
  ------------------
  |  Branch (208:7): [True: 0, False: 1.48k]
  ------------------
  209|      0|    al.cs = civil_second::min();
  210|      0|    return al;
  211|      0|  }
  212|  1.48k|  if (s > std::numeric_limits<std::time_t>::max()) {
  ------------------
  |  Branch (212:7): [True: 0, False: 1.48k]
  ------------------
  213|      0|    al.cs = civil_second::max();
  214|      0|    return al;
  215|      0|  }
  216|       |
  217|  1.48k|  const std::time_t t = static_cast<std::time_t>(s);
  218|  1.48k|  std::tm tm;
  219|  1.48k|  std::tm* tmp = local_ ? local_time(&t, &tm) : gm_time(&t, &tm);
  ------------------
  |  Branch (219:18): [True: 356, False: 1.13k]
  ------------------
  220|       |
  221|       |  // If std::tm cannot hold the result we saturate the output.
  222|  1.48k|  if (tmp == nullptr) {
  ------------------
  |  Branch (222:7): [True: 423, False: 1.06k]
  ------------------
  223|    423|    al.cs = (s < 0) ? civil_second::min() : civil_second::max();
  ------------------
  |  Branch (223:13): [True: 196, False: 227]
  ------------------
  224|    423|    return al;
  225|    423|  }
  226|       |
  227|  1.06k|  const year_t year = tmp->tm_year + year_t{1900};
  228|  1.06k|  al.cs = civil_second(year, tmp->tm_mon + 1, tmp->tm_mday,
  229|  1.06k|                       tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
  230|  1.06k|  al.offset = static_cast<int>(tm_gmtoff(*tmp));
  231|  1.06k|  al.abbr = local_ ? tm_zone(*tmp) : "UTC";  // as expected by cctz
  ------------------
  |  Branch (231:13): [True: 226, False: 838]
  ------------------
  232|  1.06k|  al.is_dst = tmp->tm_isdst > 0;
  233|  1.06k|  return al;
  234|  1.48k|}
_ZNK4cctz12TimeZoneLibC8MakeTimeERKNS_6detail10civil_timeINS1_10second_tagEEE:
  236|  2.04k|time_zone::civil_lookup TimeZoneLibC::MakeTime(const civil_second& cs) const {
  237|  2.04k|  if (!local_) {
  ------------------
  |  Branch (237:7): [True: 1.58k, False: 464]
  ------------------
  238|       |    // If time_point<seconds> cannot hold the result we saturate.
  239|  1.58k|    static const civil_second min_tp_cs =
  240|  1.58k|        civil_second() + ToUnixSeconds(time_point<seconds>::min());
  241|  1.58k|    static const civil_second max_tp_cs =
  242|  1.58k|        civil_second() + ToUnixSeconds(time_point<seconds>::max());
  243|  1.58k|    const time_point<seconds> tp =
  244|  1.58k|        (cs < min_tp_cs)
  ------------------
  |  Branch (244:9): [True: 114, False: 1.46k]
  ------------------
  245|  1.58k|            ? time_point<seconds>::min()
  246|  1.58k|            : (cs > max_tp_cs) ? time_point<seconds>::max()
  ------------------
  |  Branch (246:15): [True: 121, False: 1.34k]
  ------------------
  247|  1.46k|                               : FromUnixSeconds(cs - civil_second());
  248|  1.58k|    return {time_zone::civil_lookup::UNIQUE, tp, tp, tp};
  249|  1.58k|  }
  250|       |
  251|       |  // If tm_year cannot hold the requested year we saturate the result.
  252|    464|  if (cs.year() < 0) {
  ------------------
  |  Branch (252:7): [True: 324, False: 140]
  ------------------
  253|    324|    if (cs.year() < std::numeric_limits<int>::min() + year_t{1900}) {
  ------------------
  |  Branch (253:9): [True: 81, False: 243]
  ------------------
  254|     81|      const time_point<seconds> tp = time_point<seconds>::min();
  255|     81|      return {time_zone::civil_lookup::UNIQUE, tp, tp, tp};
  256|     81|    }
  257|    324|  } else {
  258|    140|    if (cs.year() - year_t{1900} > std::numeric_limits<int>::max()) {
  ------------------
  |  Branch (258:9): [True: 48, False: 92]
  ------------------
  259|     48|      const time_point<seconds> tp = time_point<seconds>::max();
  260|     48|      return {time_zone::civil_lookup::UNIQUE, tp, tp, tp};
  261|     48|    }
  262|    140|  }
  263|       |
  264|       |  // We probe with "is_dst" values of 0 and 1 to try to distinguish unique
  265|       |  // civil seconds from skipped or repeated ones.  This is not always possible
  266|       |  // however, as the "dst" flag does not change over some offset transitions.
  267|       |  // We are also subject to the vagaries of mktime() implementations. For
  268|       |  // example, some implementations treat "tm_isdst" as a demand (useless),
  269|       |  // and some as a disambiguator (useful).
  270|    335|  std::time_t t0, t1;
  271|    335|  std::tm tm0, tm1;
  272|    335|  if (make_time(cs, 0, &t0, &tm0) && make_time(cs, 1, &t1, &tm1)) {
  ------------------
  |  Branch (272:7): [True: 335, False: 0]
  |  Branch (272:38): [True: 334, False: 1]
  ------------------
  273|    334|    if (tm0.tm_isdst == tm1.tm_isdst) {
  ------------------
  |  Branch (273:9): [True: 334, False: 0]
  ------------------
  274|       |      // The civil time was singular (pre == trans == post).
  275|    334|      const time_point<seconds> tp = FromUnixSeconds(tm0.tm_isdst ? t1 : t0);
  ------------------
  |  Branch (275:54): [True: 0, False: 334]
  ------------------
  276|    334|      return {time_zone::civil_lookup::UNIQUE, tp, tp, tp};
  277|    334|    }
  278|       |
  279|      0|    tm_gmtoff_t offset = tm_gmtoff(tm0);
  280|      0|    if (t0 < t1) {  // negative DST
  ------------------
  |  Branch (280:9): [True: 0, False: 0]
  ------------------
  281|      0|      std::swap(t0, t1);
  282|      0|      offset = tm_gmtoff(tm1);
  283|      0|    }
  284|       |
  285|      0|    const std::time_t tt = find_trans(t1, t0, offset);
  286|      0|    const time_point<seconds> trans = FromUnixSeconds(tt);
  287|       |
  288|      0|    if (tm0.tm_isdst) {
  ------------------
  |  Branch (288:9): [True: 0, False: 0]
  ------------------
  289|       |      // The civil time did not exist (pre >= trans > post).
  290|      0|      const time_point<seconds> pre = FromUnixSeconds(t0);
  291|      0|      const time_point<seconds> post = FromUnixSeconds(t1);
  292|      0|      return {time_zone::civil_lookup::SKIPPED, pre, trans, post};
  293|      0|    }
  294|       |
  295|       |    // The civil time was ambiguous (pre < trans <= post).
  296|      0|    const time_point<seconds> pre = FromUnixSeconds(t1);
  297|      0|    const time_point<seconds> post = FromUnixSeconds(t0);
  298|      0|    return {time_zone::civil_lookup::REPEATED, pre, trans, post};
  299|      0|  }
  300|       |
  301|       |  // make_time() failed somehow so we saturate the result.
  302|      1|  const time_point<seconds> tp = (cs < civil_second())
  ------------------
  |  Branch (302:34): [True: 1, False: 0]
  ------------------
  303|      1|                                     ? time_point<seconds>::min()
  304|      1|                                     : time_point<seconds>::max();
  305|      1|  return {time_zone::civil_lookup::UNIQUE, tp, tp, tp};
  306|    335|}
_ZN4cctz12TimeZoneLibCC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  327|    232|    : local_(name == "localtime") {}
time_zone_libc.cc:_ZN4cctz12_GLOBAL__N_110local_timeEPKlP2tm:
  129|    359|inline std::tm* local_time(const std::time_t *timep, std::tm *result) {
  130|       |#if defined(_WIN32) || defined(_WIN64)
  131|       |    return localtime_s(result, timep) ? nullptr : result;
  132|       |#else
  133|    359|    return localtime_r(timep, result);
  134|    359|#endif
  135|    359|}
time_zone_libc.cc:_ZN4cctz12_GLOBAL__N_17gm_timeEPKlP2tm:
  121|  1.13k|inline std::tm* gm_time(const std::time_t *timep, std::tm *result) {
  122|       |#if defined(_WIN32) || defined(_WIN64)
  123|       |    return gmtime_s(result, timep) ? nullptr : result;
  124|       |#else
  125|  1.13k|    return gmtime_r(timep, result);
  126|  1.13k|#endif
  127|  1.13k|}
time_zone_libc.cc:_ZN4cctz12_GLOBAL__N_19make_timeERKNS_6detail10civil_timeINS1_10second_tagEEEiPlP2tm:
  141|    670|               std::tm* tm) {
  142|    670|  tm->tm_year = static_cast<int>(cs.year() - year_t{1900});
  143|    670|  tm->tm_mon = cs.month() - 1;
  144|    670|  tm->tm_mday = cs.day();
  145|    670|  tm->tm_hour = cs.hour();
  146|    670|  tm->tm_min = cs.minute();
  147|    670|  tm->tm_sec = cs.second();
  148|    670|  tm->tm_isdst = is_dst;
  149|    670|  *t = std::mktime(tm);
  150|    670|  if (*t == std::time_t{-1}) {
  ------------------
  |  Branch (150:7): [True: 3, False: 667]
  ------------------
  151|      3|    std::tm tm2;
  152|      3|    const std::tm* tmp = local_time(t, &tm2);
  153|      3|    if (tmp == nullptr || tmp->tm_year != tm->tm_year ||
  ------------------
  |  Branch (153:9): [True: 0, False: 3]
  |  Branch (153:27): [True: 1, False: 2]
  ------------------
  154|      2|        tmp->tm_mon != tm->tm_mon || tmp->tm_mday != tm->tm_mday ||
  ------------------
  |  Branch (154:9): [True: 0, False: 2]
  |  Branch (154:38): [True: 0, False: 2]
  ------------------
  155|      2|        tmp->tm_hour != tm->tm_hour || tmp->tm_min != tm->tm_min ||
  ------------------
  |  Branch (155:9): [True: 0, False: 2]
  |  Branch (155:40): [True: 0, False: 2]
  ------------------
  156|      2|        tmp->tm_sec != tm->tm_sec) {
  ------------------
  |  Branch (156:9): [True: 0, False: 2]
  ------------------
  157|       |      // A true error (not just one second before the epoch).
  158|      1|      return false;
  159|      1|    }
  160|      3|  }
  161|    669|  return true;
  162|    670|}
time_zone_libc.cc:_ZN4cctz12_GLOBAL__N_19tm_gmtoffI2tmEEDtdtfp_9tm_gmtoffERKT_:
   92|  1.06k|auto tm_gmtoff(const T& tm) -> decltype(tm.tm_gmtoff) {
   93|  1.06k|  return tm.tm_gmtoff;
   94|  1.06k|}
time_zone_libc.cc:_ZN4cctz12_GLOBAL__N_17tm_zoneI2tmEEDtdtfp_7tm_zoneERKT_:
  110|    226|auto tm_zone(const T& tm) -> decltype(tm.tm_zone) {
  111|    226|  return tm.tm_zone;
  112|    226|}

_ZNK4cctz9time_zone6lookupERKNSt3__16chrono10time_pointINS2_12system_clockENS2_8durationIlNS1_5ratioILl1ELl1EEEEEEE:
   53|  9.22k|    const time_point<seconds>& tp) const {
   54|  9.22k|  return effective_impl().BreakTime(tp);
   55|  9.22k|}
_ZNK4cctz9time_zone6lookupERKNS_6detail10civil_timeINS1_10second_tagEEE:
   57|  13.8k|time_zone::civil_lookup time_zone::lookup(const civil_second& cs) const {
   58|  13.8k|  return effective_impl().MakeTime(cs);
   59|  13.8k|}
_ZNK4cctz9time_zone14effective_implEv:
   79|  23.0k|const time_zone::Impl& time_zone::effective_impl() const {
   80|  23.0k|  if (impl_ == nullptr) {
  ------------------
  |  Branch (80:7): [True: 0, False: 23.0k]
  ------------------
   81|       |    // Dereferencing an implicit-UTC time_zone is expected to be
   82|       |    // rare, so we don't mind paying a small synchronization cost.
   83|      0|    return *time_zone::Impl::UTC().impl_;
   84|      0|  }
   85|  23.0k|  return *impl_;
   86|  23.0k|}
_ZN4cctz14load_time_zoneERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPNS_9time_zoneE:
   88|  8.99k|bool load_time_zone(const std::string& name, time_zone* tz) {
   89|  8.99k|  return time_zone::Impl::LoadTimeZone(name, tz);
   90|  8.99k|}
_ZN4cctz13utc_time_zoneEv:
   92|    170|time_zone utc_time_zone() {
   93|    170|  return time_zone::Impl::UTC();  // avoid name lookup
   94|    170|}

_ZN4cctz14ParsePosixSpecERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPNS_13PosixTimeZoneE:
  134|    129|bool ParsePosixSpec(const std::string& spec, PosixTimeZone* res) {
  135|    129|  const char* p = spec.c_str();
  136|    129|  if (*p == ':') return false;
  ------------------
  |  Branch (136:7): [True: 0, False: 129]
  ------------------
  137|       |
  138|    129|  p = ParseAbbr(p, &res->std_abbr);
  139|    129|  p = ParseOffset(p, 0, 24, -1, &res->std_offset);
  140|    129|  if (p == nullptr) return false;
  ------------------
  |  Branch (140:7): [True: 0, False: 129]
  ------------------
  141|    129|  if (*p == '\0') return true;
  ------------------
  |  Branch (141:7): [True: 66, False: 63]
  ------------------
  142|       |
  143|     63|  p = ParseAbbr(p, &res->dst_abbr);
  144|     63|  if (p == nullptr) return false;
  ------------------
  |  Branch (144:7): [True: 0, False: 63]
  ------------------
  145|     63|  res->dst_offset = res->std_offset + (60 * 60);  // default
  146|     63|  if (*p != ',') p = ParseOffset(p, 0, 24, -1, &res->dst_offset);
  ------------------
  |  Branch (146:7): [True: 0, False: 63]
  ------------------
  147|       |
  148|     63|  p = ParseDateTime(p, &res->dst_start);
  149|     63|  p = ParseDateTime(p, &res->dst_end);
  150|       |
  151|     63|  return p != nullptr && *p == '\0';
  ------------------
  |  Branch (151:10): [True: 63, False: 0]
  |  Branch (151:26): [True: 63, False: 0]
  ------------------
  152|     63|}
time_zone_posix.cc:_ZN4cctz12_GLOBAL__N_19ParseAbbrEPKcPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
   46|    192|const char* ParseAbbr(const char* p, std::string* abbr) {
   47|    192|  const char* op = p;
   48|    192|  if (*p == '<') {  // special zoneinfo <...> form
  ------------------
  |  Branch (48:7): [True: 3, False: 189]
  ------------------
   49|     12|    while (*++p != '>') {
  ------------------
  |  Branch (49:12): [True: 9, False: 3]
  ------------------
   50|      9|      if (*p == '\0') return nullptr;
  ------------------
  |  Branch (50:11): [True: 0, False: 9]
  ------------------
   51|      9|    }
   52|      3|    abbr->assign(op + 1, static_cast<std::size_t>(p - op) - 1);
   53|      3|    return ++p;
   54|      3|  }
   55|    816|  while (*p != '\0') {
  ------------------
  |  Branch (55:10): [True: 816, False: 0]
  ------------------
   56|    816|    if (strchr("-+,", *p)) break;
  ------------------
  |  Branch (56:9): [True: 90, False: 726]
  ------------------
   57|    726|    if (strchr(kDigits, *p)) break;
  ------------------
  |  Branch (57:9): [True: 99, False: 627]
  ------------------
   58|    627|    ++p;
   59|    627|  }
   60|    189|  if (p - op < 3) return nullptr;
  ------------------
  |  Branch (60:7): [True: 0, False: 189]
  ------------------
   61|    189|  abbr->assign(op, static_cast<std::size_t>(p - op));
   62|    189|  return p;
   63|    189|}
time_zone_posix.cc:_ZN4cctz12_GLOBAL__N_111ParseOffsetEPKciiiPl:
   67|    197|                        std::int_fast32_t* offset) {
   68|    197|  if (p == nullptr) return nullptr;
  ------------------
  |  Branch (68:7): [True: 0, False: 197]
  ------------------
   69|    197|  if (*p == '+' || *p == '-') {
  ------------------
  |  Branch (69:7): [True: 0, False: 197]
  |  Branch (69:20): [True: 30, False: 167]
  ------------------
   70|     30|    if (*p++ == '-') sign = -sign;
  ------------------
  |  Branch (70:9): [True: 30, False: 0]
  ------------------
   71|     30|  }
   72|    197|  int hours = 0;
   73|    197|  int minutes = 0;
   74|    197|  int seconds = 0;
   75|       |
   76|    197|  p = ParseInt(p, min_hour, max_hour, &hours);
   77|    197|  if (p == nullptr) return nullptr;
  ------------------
  |  Branch (77:7): [True: 0, False: 197]
  ------------------
   78|    197|  if (*p == ':') {
  ------------------
  |  Branch (78:7): [True: 0, False: 197]
  ------------------
   79|      0|    p = ParseInt(p + 1, 0, 59, &minutes);
   80|      0|    if (p == nullptr) return nullptr;
  ------------------
  |  Branch (80:9): [True: 0, False: 0]
  ------------------
   81|      0|    if (*p == ':') {
  ------------------
  |  Branch (81:9): [True: 0, False: 0]
  ------------------
   82|      0|      p = ParseInt(p + 1, 0, 59, &seconds);
   83|      0|      if (p == nullptr) return nullptr;
  ------------------
  |  Branch (83:11): [True: 0, False: 0]
  ------------------
   84|      0|    }
   85|      0|  }
   86|    197|  *offset = sign * ((((hours * 60) + minutes) * 60) + seconds);
   87|    197|  return p;
   88|    197|}
time_zone_posix.cc:_ZN4cctz12_GLOBAL__N_18ParseIntEPKciiPi:
   28|    575|const char* ParseInt(const char* p, int min, int max, int* vp) {
   29|    575|  int value = 0;
   30|    575|  const char* op = p;
   31|    575|  const int kMaxInt = std::numeric_limits<int>::max();
   32|  1.22k|  for (; const char* dp = strchr(kDigits, *p); ++p) {
  ------------------
  |  Branch (32:22): [True: 778, False: 446]
  ------------------
   33|    778|    int d = static_cast<int>(dp - kDigits);
   34|    778|    if (d >= 10) break;  // '\0'
  ------------------
  |  Branch (34:9): [True: 129, False: 649]
  ------------------
   35|    649|    if (value > kMaxInt / 10) return nullptr;
  ------------------
  |  Branch (35:9): [True: 0, False: 649]
  ------------------
   36|    649|    value *= 10;
   37|    649|    if (value > kMaxInt - d) return nullptr;
  ------------------
  |  Branch (37:9): [True: 0, False: 649]
  ------------------
   38|    649|    value += d;
   39|    649|  }
   40|    575|  if (p == op || value < min || value > max) return nullptr;
  ------------------
  |  Branch (40:7): [True: 0, False: 575]
  |  Branch (40:18): [True: 0, False: 575]
  |  Branch (40:33): [True: 0, False: 575]
  ------------------
   41|    575|  *vp = value;
   42|    575|  return p;
   43|    575|}
time_zone_posix.cc:_ZN4cctz12_GLOBAL__N_113ParseDateTimeEPKcPNS_15PosixTransitionE:
   91|    126|const char* ParseDateTime(const char* p, PosixTransition* res) {
   92|    126|  if (p != nullptr) {
  ------------------
  |  Branch (92:7): [True: 126, False: 0]
  ------------------
   93|    126|    if (*p != ',') return nullptr;
  ------------------
  |  Branch (93:9): [True: 0, False: 126]
  ------------------
   94|    126|    if (*++p == 'M') {
  ------------------
  |  Branch (94:9): [True: 126, False: 0]
  ------------------
   95|    126|      int month = 0;
   96|    126|      if ((p = ParseInt(p + 1, 1, 12, &month)) != nullptr) {
  ------------------
  |  Branch (96:11): [True: 126, False: 0]
  ------------------
   97|    126|        if (*p != '.') return nullptr;
  ------------------
  |  Branch (97:13): [True: 0, False: 126]
  ------------------
   98|    126|        int week = 0;
   99|    126|        if ((p = ParseInt(p + 1, 1, 5, &week)) != nullptr) {
  ------------------
  |  Branch (99:13): [True: 126, False: 0]
  ------------------
  100|    126|          if (*p != '.') return nullptr;
  ------------------
  |  Branch (100:15): [True: 0, False: 126]
  ------------------
  101|    126|          int weekday = 0;
  102|    126|          if ((p = ParseInt(p + 1, 0, 6, &weekday)) != nullptr) {
  ------------------
  |  Branch (102:15): [True: 126, False: 0]
  ------------------
  103|    126|            res->date.fmt = PosixTransition::M;
  104|    126|            res->date.m.month = static_cast<std::int_fast8_t>(month);
  105|    126|            res->date.m.week = static_cast<std::int_fast8_t>(week);
  106|    126|            res->date.m.weekday = static_cast<std::int_fast8_t>(weekday);
  107|    126|          }
  108|    126|        }
  109|    126|      }
  110|    126|    } else if (*p == 'J') {
  ------------------
  |  Branch (110:16): [True: 0, False: 0]
  ------------------
  111|      0|      int day = 0;
  112|      0|      if ((p = ParseInt(p + 1, 1, 365, &day)) != nullptr) {
  ------------------
  |  Branch (112:11): [True: 0, False: 0]
  ------------------
  113|      0|        res->date.fmt = PosixTransition::J;
  114|      0|        res->date.j.day = static_cast<std::int_fast16_t>(day);
  115|      0|      }
  116|      0|    } else {
  117|      0|      int day = 0;
  118|      0|      if ((p = ParseInt(p, 0, 365, &day)) != nullptr) {
  ------------------
  |  Branch (118:11): [True: 0, False: 0]
  ------------------
  119|      0|        res->date.fmt = PosixTransition::N;
  120|      0|        res->date.n.day = static_cast<std::int_fast16_t>(day);
  121|      0|      }
  122|      0|    }
  123|    126|    if (p != nullptr) {
  ------------------
  |  Branch (123:9): [True: 126, False: 0]
  ------------------
  124|    126|      res->time.offset = 2 * 60 * 60;  // default offset is 02:00:00
  125|    126|      if (*p == '/') p = ParseOffset(p + 1, -167, 167, 1, &res->time.offset);
  ------------------
  |  Branch (125:11): [True: 68, False: 58]
  ------------------
  126|    126|    }
  127|    126|  }
  128|    126|  return p;
  129|    126|}

_ZN4cctz14ZoneInfoSourceD2Ev:
   20|    159|ZoneInfoSource::~ZoneInfoSource() {}
zone_info_source.cc:_ZN14cctz_extension12_GLOBAL__N_114DefaultFactoryERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_8functionIFNS1_10unique_ptrIN4cctz14ZoneInfoSourceENS1_14default_deleteISD_EEEES9_EEE:
   34|    638|        const std::string& name)>& fallback_factory) {
   35|    638|  return fallback_factory(name);
   36|    638|}

