_ZN4Json10CharReaderC2ENSt3__110unique_ptrINS0_4ImplENS1_14default_deleteIS3_EEEE:
  296|  3.43k|  explicit CharReader(std::unique_ptr<Impl> impl) : _impl(std::move(impl)) {}
_ZN4Json10CharReader7FactoryD2Ev:
  280|  3.43k|    virtual ~Factory() = default;
_ZN4Json10CharReader4ImplD2Ev:
  290|  3.43k|    virtual ~Impl() = default;
_ZN4Json10CharReaderD2Ev:
  253|  3.43k|  virtual ~CharReader() = default;

_ZN4Json5Value7setTypeENS_9ValueTypeE:
  689|  5.71M|  void setType(ValueType v) {
  690|  5.71M|    bits_.value_type_ = static_cast<unsigned char>(v);
  691|  5.71M|  }
_ZNK4Json5Value11isAllocatedEv:
  692|    860|  bool isAllocated() const { return bits_.allocated_; }
_ZN4Json5Value14setIsAllocatedEb:
  693|  5.71M|  void setIsAllocated(bool v) { bits_.allocated_ = v; }
_ZN4Json5Value8CommentsC2Ev:
  730|  8.51M|    Comments() = default;

_ZN4Json11OurFeatures3allEv:
  858|  3.43k|OurFeatures OurFeatures::all() { return {}; }
_ZN4Json9OurReader15containsNewLineEPKcS2_:
  975|   119k|                                OurReader::Location end) {
  976|   119k|  return std::any_of(begin, end, [](char b) { return b == '\n' || b == '\r'; });
  977|   119k|}
_ZN4Json9OurReaderC2ERKNS_11OurFeaturesE:
  979|  3.43k|OurReader::OurReader(OurFeatures const& features) : features_(features) {}
_ZN4Json9OurReader5parseEPKcS2_RNS_5ValueEb:
  982|  3.43k|                      bool collectComments) {
  983|  3.43k|  if (!features_.allowComments_) {
  ------------------
  |  Branch (983:7): [True: 0, False: 3.43k]
  ------------------
  984|      0|    collectComments = false;
  985|      0|  }
  986|       |
  987|  3.43k|  begin_ = beginDoc;
  988|  3.43k|  end_ = endDoc;
  989|  3.43k|  collectComments_ = collectComments;
  990|  3.43k|  current_ = begin_;
  991|  3.43k|  lastValueEnd_ = nullptr;
  992|  3.43k|  lastValue_ = nullptr;
  993|  3.43k|  commentsBefore_.clear();
  994|  3.43k|  errors_.clear();
  995|  3.43k|  while (!nodes_.empty())
  ------------------
  |  Branch (995:10): [True: 0, False: 3.43k]
  ------------------
  996|      0|    nodes_.pop();
  997|  3.43k|  nodes_.push(&root);
  998|       |
  999|       |  // skip byte order mark if it exists at the beginning of the UTF-8 text.
 1000|  3.43k|  skipBom(features_.skipBom_);
 1001|  3.43k|  bool successful = readValue();
 1002|  3.43k|  nodes_.pop();
 1003|  3.43k|  Token token;
 1004|  3.43k|  readTokenSkippingComments(token);
 1005|  3.43k|  if (features_.failIfExtra_ && (token.type_ != tokenEndOfStream)) {
  ------------------
  |  Branch (1005:7): [True: 1.51k, False: 1.91k]
  |  Branch (1005:33): [True: 187, False: 1.33k]
  ------------------
 1006|    187|    addError("Extra non-whitespace after JSON value.", token);
 1007|    187|    return false;
 1008|    187|  }
 1009|  3.24k|  if (collectComments_ && !commentsBefore_.empty())
  ------------------
  |  Branch (1009:7): [True: 1.86k, False: 1.38k]
  |  Branch (1009:27): [True: 126, False: 1.73k]
  ------------------
 1010|    126|    root.setComment(commentsBefore_, commentAfter);
 1011|  3.24k|  if (features_.strictRoot_) {
  ------------------
  |  Branch (1011:7): [True: 0, False: 3.24k]
  ------------------
 1012|      0|    if (!root.isArray() && !root.isObject()) {
  ------------------
  |  Branch (1012:9): [True: 0, False: 0]
  |  Branch (1012:28): [True: 0, False: 0]
  ------------------
 1013|       |      // Set error location to start of doc, ideally should be first token found
 1014|       |      // in doc
 1015|      0|      token.type_ = tokenError;
 1016|      0|      token.start_ = beginDoc;
 1017|      0|      token.end_ = endDoc;
 1018|      0|      addError(
 1019|      0|          "A valid JSON document must be either an array or an object value.",
 1020|      0|          token);
 1021|      0|      return false;
 1022|      0|    }
 1023|      0|  }
 1024|  3.24k|  return successful;
 1025|  3.24k|}
_ZN4Json9OurReader9readValueEv:
 1027|  1.39M|bool OurReader::readValue() {
 1028|       |  //  To preserve the old behaviour we cast size_t to int.
 1029|  1.39M|  if (nodes_.size() > features_.stackLimit_)
  ------------------
  |  Branch (1029:7): [True: 28, False: 1.39M]
  ------------------
 1030|     28|    throwRuntimeError("Exceeded stackLimit in readValue().");
 1031|  1.39M|  Token token;
 1032|  1.39M|  readTokenSkippingComments(token);
 1033|  1.39M|  bool successful = true;
 1034|       |
 1035|  1.39M|  if (collectComments_ && !commentsBefore_.empty()) {
  ------------------
  |  Branch (1035:7): [True: 1.33M, False: 60.6k]
  |  Branch (1035:27): [True: 2.52k, False: 1.33M]
  ------------------
 1036|  2.52k|    currentValue().setComment(commentsBefore_, commentBefore);
 1037|  2.52k|    commentsBefore_.clear();
 1038|  2.52k|  }
 1039|       |
 1040|  1.39M|  switch (token.type_) {
 1041|  14.4k|  case tokenObjectBegin:
  ------------------
  |  Branch (1041:3): [True: 14.4k, False: 1.38M]
  ------------------
 1042|  14.4k|    successful = readObject(token);
 1043|  14.4k|    currentValue().setOffsetLimit(current_ - begin_);
 1044|  14.4k|    break;
 1045|  64.7k|  case tokenArrayBegin:
  ------------------
  |  Branch (1045:3): [True: 64.7k, False: 1.33M]
  ------------------
 1046|  64.7k|    successful = readArray(token);
 1047|  64.7k|    currentValue().setOffsetLimit(current_ - begin_);
 1048|  64.7k|    break;
 1049|  1.31M|  case tokenNumber:
  ------------------
  |  Branch (1049:3): [True: 1.31M, False: 83.9k]
  ------------------
 1050|  1.31M|    successful = decodeNumber(token);
 1051|  1.31M|    break;
 1052|  1.01k|  case tokenString:
  ------------------
  |  Branch (1052:3): [True: 1.01k, False: 1.39M]
  ------------------
 1053|  1.01k|    successful = decodeString(token);
 1054|  1.01k|    break;
 1055|  1.61k|  case tokenTrue: {
  ------------------
  |  Branch (1055:3): [True: 1.61k, False: 1.39M]
  ------------------
 1056|  1.61k|    Value v(true);
 1057|  1.61k|    currentValue().swapPayload(v);
 1058|  1.61k|    currentValue().setOffsetStart(token.start_ - begin_);
 1059|  1.61k|    currentValue().setOffsetLimit(token.end_ - begin_);
 1060|  1.61k|  } break;
 1061|    208|  case tokenFalse: {
  ------------------
  |  Branch (1061:3): [True: 208, False: 1.39M]
  ------------------
 1062|    208|    Value v(false);
 1063|    208|    currentValue().swapPayload(v);
 1064|    208|    currentValue().setOffsetStart(token.start_ - begin_);
 1065|    208|    currentValue().setOffsetLimit(token.end_ - begin_);
 1066|    208|  } break;
 1067|    435|  case tokenNull: {
  ------------------
  |  Branch (1067:3): [True: 435, False: 1.39M]
  ------------------
 1068|    435|    Value v;
 1069|    435|    currentValue().swapPayload(v);
 1070|    435|    currentValue().setOffsetStart(token.start_ - begin_);
 1071|    435|    currentValue().setOffsetLimit(token.end_ - begin_);
 1072|    435|  } break;
 1073|      0|  case tokenNaN: {
  ------------------
  |  Branch (1073:3): [True: 0, False: 1.39M]
  ------------------
 1074|      0|    Value v(std::numeric_limits<double>::quiet_NaN());
 1075|      0|    currentValue().swapPayload(v);
 1076|      0|    currentValue().setOffsetStart(token.start_ - begin_);
 1077|      0|    currentValue().setOffsetLimit(token.end_ - begin_);
 1078|      0|  } break;
 1079|      0|  case tokenPosInf: {
  ------------------
  |  Branch (1079:3): [True: 0, False: 1.39M]
  ------------------
 1080|      0|    Value v(std::numeric_limits<double>::infinity());
 1081|      0|    currentValue().swapPayload(v);
 1082|      0|    currentValue().setOffsetStart(token.start_ - begin_);
 1083|      0|    currentValue().setOffsetLimit(token.end_ - begin_);
 1084|      0|  } break;
 1085|      0|  case tokenNegInf: {
  ------------------
  |  Branch (1085:3): [True: 0, False: 1.39M]
  ------------------
 1086|      0|    Value v(-std::numeric_limits<double>::infinity());
 1087|      0|    currentValue().swapPayload(v);
 1088|      0|    currentValue().setOffsetStart(token.start_ - begin_);
 1089|      0|    currentValue().setOffsetLimit(token.end_ - begin_);
 1090|      0|  } break;
 1091|     12|  case tokenArraySeparator:
  ------------------
  |  Branch (1091:3): [True: 12, False: 1.39M]
  ------------------
 1092|     21|  case tokenObjectEnd:
  ------------------
  |  Branch (1092:3): [True: 9, False: 1.39M]
  ------------------
 1093|     25|  case tokenArrayEnd:
  ------------------
  |  Branch (1093:3): [True: 4, False: 1.39M]
  ------------------
 1094|     25|    if (features_.allowDroppedNullPlaceholders_) {
  ------------------
  |  Branch (1094:9): [True: 0, False: 25]
  ------------------
 1095|       |      // "Un-read" the current token and mark the current value as a null
 1096|       |      // token.
 1097|      0|      current_--;
 1098|      0|      Value v;
 1099|      0|      currentValue().swapPayload(v);
 1100|      0|      currentValue().setOffsetStart(current_ - begin_ - 1);
 1101|      0|      currentValue().setOffsetLimit(current_ - begin_);
 1102|      0|      break;
 1103|      0|    } // else, fall through ...
 1104|  1.44k|  default:
  ------------------
  |  Branch (1104:3): [True: 1.41k, False: 1.39M]
  ------------------
 1105|  1.44k|    currentValue().setOffsetStart(token.start_ - begin_);
 1106|  1.44k|    currentValue().setOffsetLimit(token.end_ - begin_);
 1107|  1.44k|    return addError("Syntax error: value, object or array expected.", token);
 1108|  1.39M|  }
 1109|       |
 1110|  1.36M|  if (collectComments_) {
  ------------------
  |  Branch (1110:7): [True: 1.31M, False: 47.0k]
  ------------------
 1111|  1.31M|    lastValueEnd_ = current_;
 1112|  1.31M|    lastValueHasAComment_ = false;
 1113|  1.31M|    lastValue_ = &currentValue();
 1114|  1.31M|  }
 1115|       |
 1116|  1.36M|  return successful;
 1117|  1.39M|}
_ZN4Json9OurReader25readTokenSkippingCommentsERNS0_5TokenE:
 1119|  2.74M|bool OurReader::readTokenSkippingComments(Token& token) {
 1120|  2.74M|  bool success = readToken(token);
 1121|  2.74M|  if (features_.allowComments_) {
  ------------------
  |  Branch (1121:7): [True: 2.74M, False: 0]
  ------------------
 1122|  2.75M|    while (success && token.type_ == tokenComment) {
  ------------------
  |  Branch (1122:12): [True: 2.75M, False: 895]
  |  Branch (1122:23): [True: 8.32k, False: 2.74M]
  ------------------
 1123|  8.32k|      success = readToken(token);
 1124|  8.32k|    }
 1125|  2.74M|  }
 1126|  2.74M|  return success;
 1127|  2.74M|}
_ZN4Json9OurReader9readTokenERNS0_5TokenE:
 1129|  4.88M|bool OurReader::readToken(Token& token) {
 1130|  4.88M|  skipSpaces();
 1131|  4.88M|  token.start_ = current_;
 1132|  4.88M|  Char c = getNextChar();
 1133|  4.88M|  bool ok = true;
 1134|  4.88M|  switch (c) {
 1135|  15.2k|  case '{':
  ------------------
  |  Branch (1135:3): [True: 15.2k, False: 4.87M]
  ------------------
 1136|  15.2k|    token.type_ = tokenObjectBegin;
 1137|  15.2k|    break;
 1138|  1.96k|  case '}':
  ------------------
  |  Branch (1138:3): [True: 1.96k, False: 4.88M]
  ------------------
 1139|  1.96k|    token.type_ = tokenObjectEnd;
 1140|  1.96k|    break;
 1141|  67.9k|  case '[':
  ------------------
  |  Branch (1141:3): [True: 67.9k, False: 4.81M]
  ------------------
 1142|  67.9k|    token.type_ = tokenArrayBegin;
 1143|  67.9k|    break;
 1144|  1.63k|  case ']':
  ------------------
  |  Branch (1144:3): [True: 1.63k, False: 4.88M]
  ------------------
 1145|  1.63k|    token.type_ = tokenArrayEnd;
 1146|  1.63k|    break;
 1147|  35.5k|  case '"':
  ------------------
  |  Branch (1147:3): [True: 35.5k, False: 4.85M]
  ------------------
 1148|  35.5k|    token.type_ = tokenString;
 1149|  35.5k|    ok = readString();
 1150|  35.5k|    break;
 1151|  2.19k|  case '\'':
  ------------------
  |  Branch (1151:3): [True: 2.19k, False: 4.88M]
  ------------------
 1152|  2.19k|    if (features_.allowSingleQuotes_) {
  ------------------
  |  Branch (1152:9): [True: 0, False: 2.19k]
  ------------------
 1153|      0|      token.type_ = tokenString;
 1154|      0|      ok = readStringSingleQuote();
 1155|  2.19k|    } else {
 1156|       |      // If we don't allow single quotes, this is a failure case.
 1157|  2.19k|      ok = false;
 1158|  2.19k|    }
 1159|  2.19k|    break;
 1160|   138k|  case '/':
  ------------------
  |  Branch (1160:3): [True: 138k, False: 4.74M]
  ------------------
 1161|   138k|    token.type_ = tokenComment;
 1162|   138k|    ok = readComment();
 1163|   138k|    break;
 1164|   110k|  case '0':
  ------------------
  |  Branch (1164:3): [True: 110k, False: 4.77M]
  ------------------
 1165|   132k|  case '1':
  ------------------
  |  Branch (1165:3): [True: 22.0k, False: 4.86M]
  ------------------
 1166|   136k|  case '2':
  ------------------
  |  Branch (1166:3): [True: 4.17k, False: 4.88M]
  ------------------
 1167|   214k|  case '3':
  ------------------
  |  Branch (1167:3): [True: 77.9k, False: 4.80M]
  ------------------
 1168|  2.05M|  case '4':
  ------------------
  |  Branch (1168:3): [True: 1.84M, False: 3.04M]
  ------------------
 1169|  2.06M|  case '5':
  ------------------
  |  Branch (1169:3): [True: 9.65k, False: 4.87M]
  ------------------
 1170|  2.07M|  case '6':
  ------------------
  |  Branch (1170:3): [True: 6.10k, False: 4.88M]
  ------------------
 1171|  2.08M|  case '7':
  ------------------
  |  Branch (1171:3): [True: 9.92k, False: 4.87M]
  ------------------
 1172|  2.10M|  case '8':
  ------------------
  |  Branch (1172:3): [True: 21.8k, False: 4.86M]
  ------------------
 1173|  2.10M|  case '9':
  ------------------
  |  Branch (1173:3): [True: 975, False: 4.88M]
  ------------------
 1174|  2.10M|    token.type_ = tokenNumber;
 1175|  2.10M|    readNumber(false);
 1176|  2.10M|    break;
 1177|  19.1k|  case '-':
  ------------------
  |  Branch (1177:3): [True: 19.1k, False: 4.86M]
  ------------------
 1178|  19.1k|    if (readNumber(true)) {
  ------------------
  |  Branch (1178:9): [True: 18.8k, False: 290]
  ------------------
 1179|  18.8k|      token.type_ = tokenNumber;
 1180|  18.8k|    } else {
 1181|    290|      token.type_ = tokenNegInf;
 1182|    290|      ok = features_.allowSpecialFloats_ && match("nfinity", 7);
  ------------------
  |  Branch (1182:12): [True: 0, False: 290]
  |  Branch (1182:45): [True: 0, False: 0]
  ------------------
 1183|    290|    }
 1184|  19.1k|    break;
 1185|  1.80k|  case '+':
  ------------------
  |  Branch (1185:3): [True: 1.80k, False: 4.88M]
  ------------------
 1186|  1.80k|    if (readNumber(true)) {
  ------------------
  |  Branch (1186:9): [True: 1.57k, False: 228]
  ------------------
 1187|  1.57k|      token.type_ = tokenNumber;
 1188|  1.57k|    } else {
 1189|    228|      token.type_ = tokenPosInf;
 1190|    228|      ok = features_.allowSpecialFloats_ && match("nfinity", 7);
  ------------------
  |  Branch (1190:12): [True: 0, False: 228]
  |  Branch (1190:45): [True: 0, False: 0]
  ------------------
 1191|    228|    }
 1192|  1.80k|    break;
 1193|  4.92k|  case 't':
  ------------------
  |  Branch (1193:3): [True: 4.92k, False: 4.88M]
  ------------------
 1194|  4.92k|    token.type_ = tokenTrue;
 1195|  4.92k|    ok = match("rue", 3);
 1196|  4.92k|    break;
 1197|  14.3k|  case 'f':
  ------------------
  |  Branch (1197:3): [True: 14.3k, False: 4.87M]
  ------------------
 1198|  14.3k|    token.type_ = tokenFalse;
 1199|  14.3k|    ok = match("alse", 4);
 1200|  14.3k|    break;
 1201|  5.95k|  case 'n':
  ------------------
  |  Branch (1201:3): [True: 5.95k, False: 4.88M]
  ------------------
 1202|  5.95k|    token.type_ = tokenNull;
 1203|  5.95k|    ok = match("ull", 3);
 1204|  5.95k|    break;
 1205|    371|  case 'N':
  ------------------
  |  Branch (1205:3): [True: 371, False: 4.88M]
  ------------------
 1206|    371|    if (features_.allowSpecialFloats_) {
  ------------------
  |  Branch (1206:9): [True: 0, False: 371]
  ------------------
 1207|      0|      token.type_ = tokenNaN;
 1208|      0|      ok = match("aN", 2);
 1209|    371|    } else {
 1210|    371|      ok = false;
 1211|    371|    }
 1212|    371|    break;
 1213|    695|  case 'I':
  ------------------
  |  Branch (1213:3): [True: 695, False: 4.88M]
  ------------------
 1214|    695|    if (features_.allowSpecialFloats_) {
  ------------------
  |  Branch (1214:9): [True: 0, False: 695]
  ------------------
 1215|      0|      token.type_ = tokenPosInf;
 1216|      0|      ok = match("nfinity", 7);
 1217|    695|    } else {
 1218|    695|      ok = false;
 1219|    695|    }
 1220|    695|    break;
 1221|  2.13M|  case ',':
  ------------------
  |  Branch (1221:3): [True: 2.13M, False: 2.75M]
  ------------------
 1222|  2.13M|    token.type_ = tokenArraySeparator;
 1223|  2.13M|    break;
 1224|  33.9k|  case ':':
  ------------------
  |  Branch (1224:3): [True: 33.9k, False: 4.85M]
  ------------------
 1225|  33.9k|    token.type_ = tokenMemberSeparator;
 1226|  33.9k|    break;
 1227|  52.4k|  case 0:
  ------------------
  |  Branch (1227:3): [True: 52.4k, False: 4.83M]
  ------------------
 1228|  52.4k|    token.type_ = tokenEndOfStream;
 1229|  52.4k|    break;
 1230|   249k|  default:
  ------------------
  |  Branch (1230:3): [True: 249k, False: 4.63M]
  ------------------
 1231|   249k|    ok = false;
 1232|   249k|    break;
 1233|  4.88M|  }
 1234|  4.88M|  if (!ok)
  ------------------
  |  Branch (1234:7): [True: 275k, False: 4.61M]
  ------------------
 1235|   275k|    token.type_ = tokenError;
 1236|  4.88M|  token.end_ = current_;
 1237|  4.88M|  return ok;
 1238|  4.88M|}
_ZN4Json9OurReader10skipSpacesEv:
 1240|  6.25M|void OurReader::skipSpaces() {
 1241|  6.25M|  while (current_ != end_) {
  ------------------
  |  Branch (1241:10): [True: 6.20M, False: 52.4k]
  ------------------
 1242|  6.20M|    Char c = *current_;
 1243|  6.20M|    if (c == ' ' || c == '\t' || c == '\r' || c == '\n')
  ------------------
  |  Branch (1243:9): [True: 511, False: 6.19M]
  |  Branch (1243:21): [True: 584, False: 6.19M]
  |  Branch (1243:34): [True: 469, False: 6.19M]
  |  Branch (1243:47): [True: 664, False: 6.19M]
  ------------------
 1244|  2.22k|      ++current_;
 1245|  6.19M|    else
 1246|  6.19M|      break;
 1247|  6.20M|  }
 1248|  6.25M|}
_ZN4Json9OurReader7skipBomEb:
 1250|  3.43k|void OurReader::skipBom(bool skipBom) {
 1251|       |  // The default behavior is to skip BOM.
 1252|  3.43k|  if (skipBom) {
  ------------------
  |  Branch (1252:7): [True: 3.43k, False: 0]
  ------------------
 1253|  3.43k|    if ((end_ - begin_) >= 3 && strncmp(begin_, "\xEF\xBB\xBF", 3) == 0) {
  ------------------
  |  Branch (1253:9): [True: 3.22k, False: 213]
  |  Branch (1253:33): [True: 1, False: 3.22k]
  ------------------
 1254|      1|      begin_ += 3;
 1255|      1|      current_ = begin_;
 1256|      1|    }
 1257|  3.43k|  }
 1258|  3.43k|}
_ZN4Json9OurReader5matchEPKci:
 1260|  25.2k|bool OurReader::match(const Char* pattern, int patternLength) {
 1261|  25.2k|  if (end_ - current_ < patternLength)
  ------------------
  |  Branch (1261:7): [True: 67, False: 25.1k]
  ------------------
 1262|     67|    return false;
 1263|  25.1k|  int index = patternLength;
 1264|  89.3k|  while (index--)
  ------------------
  |  Branch (1264:10): [True: 73.8k, False: 15.5k]
  ------------------
 1265|  73.8k|    if (current_[index] != pattern[index])
  ------------------
  |  Branch (1265:9): [True: 9.63k, False: 64.2k]
  ------------------
 1266|  9.63k|      return false;
 1267|  15.5k|  current_ += patternLength;
 1268|  15.5k|  return true;
 1269|  25.1k|}
_ZN4Json9OurReader11readCommentEv:
 1271|   138k|bool OurReader::readComment() {
 1272|   138k|  const Location commentBegin = current_ - 1;
 1273|   138k|  const Char c = getNextChar();
 1274|   138k|  bool successful = false;
 1275|   138k|  bool cStyleWithEmbeddedNewline = false;
 1276|       |
 1277|   138k|  const bool isCStyleComment = (c == '*');
 1278|   138k|  const bool isCppStyleComment = (c == '/');
 1279|   138k|  if (isCStyleComment) {
  ------------------
  |  Branch (1279:7): [True: 65.8k, False: 73.0k]
  ------------------
 1280|  65.8k|    successful = readCStyleComment(&cStyleWithEmbeddedNewline);
 1281|  73.0k|  } else if (isCppStyleComment) {
  ------------------
  |  Branch (1281:14): [True: 60.9k, False: 12.0k]
  ------------------
 1282|  60.9k|    successful = readCppStyleComment();
 1283|  60.9k|  }
 1284|       |
 1285|   138k|  if (!successful)
  ------------------
  |  Branch (1285:7): [True: 12.1k, False: 126k]
  ------------------
 1286|  12.1k|    return false;
 1287|       |
 1288|   126k|  if (collectComments_) {
  ------------------
  |  Branch (1288:7): [True: 125k, False: 1.15k]
  ------------------
 1289|   125k|    CommentPlacement placement = commentBefore;
 1290|       |
 1291|   125k|    if (!lastValueHasAComment_) {
  ------------------
  |  Branch (1291:9): [True: 124k, False: 659]
  ------------------
 1292|   124k|      if (lastValueEnd_ && !containsNewLine(lastValueEnd_, commentBegin)) {
  ------------------
  |  Branch (1292:11): [True: 119k, False: 5.35k]
  |  Branch (1292:28): [True: 1.62k, False: 117k]
  ------------------
 1293|  1.62k|        if (isCppStyleComment || !cStyleWithEmbeddedNewline) {
  ------------------
  |  Branch (1293:13): [True: 818, False: 806]
  |  Branch (1293:34): [True: 610, False: 196]
  ------------------
 1294|  1.42k|          placement = commentAfterOnSameLine;
 1295|  1.42k|          lastValueHasAComment_ = true;
 1296|  1.42k|        }
 1297|  1.62k|      }
 1298|   124k|    }
 1299|       |
 1300|   125k|    addComment(commentBegin, current_, placement);
 1301|   125k|  }
 1302|   126k|  return true;
 1303|   138k|}
_ZN4Json9OurReader12normalizeEOLEPKcS2_:
 1306|   125k|                               OurReader::Location end) {
 1307|   125k|  String normalized;
 1308|   125k|  normalized.reserve(static_cast<size_t>(end - begin));
 1309|   125k|  OurReader::Location current = begin;
 1310|  4.98M|  while (current != end) {
  ------------------
  |  Branch (1310:10): [True: 4.85M, False: 125k]
  ------------------
 1311|  4.85M|    char c = *current++;
 1312|  4.85M|    if (c == '\r') {
  ------------------
  |  Branch (1312:9): [True: 59.6k, False: 4.79M]
  ------------------
 1313|  59.6k|      if (current != end && *current == '\n')
  ------------------
  |  Branch (1313:11): [True: 4.39k, False: 55.2k]
  |  Branch (1313:29): [True: 1.10k, False: 3.28k]
  ------------------
 1314|       |        // convert dos EOL
 1315|  1.10k|        ++current;
 1316|       |      // convert Mac EOL
 1317|  59.6k|      normalized += '\n';
 1318|  4.79M|    } else {
 1319|  4.79M|      normalized += c;
 1320|  4.79M|    }
 1321|  4.85M|  }
 1322|   125k|  return normalized;
 1323|   125k|}
_ZN4Json9OurReader10addCommentEPKcS2_NS_16CommentPlacementE:
 1326|   125k|                           CommentPlacement placement) {
 1327|   125k|  assert(collectComments_);
 1328|   125k|  const String& normalized = normalizeEOL(begin, end);
 1329|   125k|  if (placement == commentAfterOnSameLine) {
  ------------------
  |  Branch (1329:7): [True: 1.42k, False: 124k]
  ------------------
 1330|  1.42k|    assert(lastValue_ != nullptr);
 1331|  1.42k|    lastValue_->setComment(normalized, placement);
 1332|   124k|  } else {
 1333|   124k|    commentsBefore_ += normalized;
 1334|   124k|  }
 1335|   125k|}
_ZN4Json9OurReader17readCStyleCommentEPb:
 1337|  65.8k|bool OurReader::readCStyleComment(bool* containsNewLineResult) {
 1338|  65.8k|  *containsNewLineResult = false;
 1339|       |
 1340|  1.38M|  while ((current_ + 1) < end_) {
  ------------------
  |  Branch (1340:10): [True: 1.38M, False: 133]
  ------------------
 1341|  1.38M|    Char c = getNextChar();
 1342|  1.38M|    if (c == '*' && *current_ == '/')
  ------------------
  |  Branch (1342:9): [True: 97.2k, False: 1.28M]
  |  Branch (1342:21): [True: 65.7k, False: 31.5k]
  ------------------
 1343|  65.7k|      break;
 1344|  1.31M|    if (c == '\n')
  ------------------
  |  Branch (1344:9): [True: 4.31k, False: 1.31M]
  ------------------
 1345|  4.31k|      *containsNewLineResult = true;
 1346|  1.31M|  }
 1347|       |
 1348|  65.8k|  return getNextChar() == '/';
 1349|  65.8k|}
_ZN4Json9OurReader19readCppStyleCommentEv:
 1351|  60.9k|bool OurReader::readCppStyleComment() {
 1352|  3.50M|  while (current_ != end_) {
  ------------------
  |  Branch (1352:10): [True: 3.50M, False: 241]
  ------------------
 1353|  3.50M|    Char c = getNextChar();
 1354|  3.50M|    if (c == '\n')
  ------------------
  |  Branch (1354:9): [True: 4.56k, False: 3.49M]
  ------------------
 1355|  4.56k|      break;
 1356|  3.49M|    if (c == '\r') {
  ------------------
  |  Branch (1356:9): [True: 56.1k, False: 3.44M]
  ------------------
 1357|       |      // Consume DOS EOL. It will be normalized in addComment.
 1358|  56.1k|      if (current_ != end_ && *current_ == '\n')
  ------------------
  |  Branch (1358:11): [True: 56.1k, False: 12]
  |  Branch (1358:31): [True: 303, False: 55.8k]
  ------------------
 1359|    303|        getNextChar();
 1360|       |      // Break on Moc OS 9 EOL.
 1361|  56.1k|      break;
 1362|  56.1k|    }
 1363|  3.49M|  }
 1364|  60.9k|  return true;
 1365|  60.9k|}
_ZN4Json9OurReader10readNumberEb:
 1367|  2.12M|bool OurReader::readNumber(bool checkInf) {
 1368|  2.12M|  Location p = current_;
 1369|  2.12M|  if (checkInf && p != end_ && *p == 'I') {
  ------------------
  |  Branch (1369:7): [True: 20.9k, False: 2.10M]
  |  Branch (1369:19): [True: 20.8k, False: 63]
  |  Branch (1369:32): [True: 518, False: 20.3k]
  ------------------
 1370|    518|    current_ = ++p;
 1371|    518|    return false;
 1372|    518|  }
 1373|  2.12M|  char c = '0'; // stopgap for already consumed character
 1374|       |  // integral part
 1375|  15.8M|  while (c >= '0' && c <= '9')
  ------------------
  |  Branch (1375:10): [True: 13.7M, False: 2.12M]
  |  Branch (1375:22): [True: 13.7M, False: 5.56k]
  ------------------
 1376|  13.7M|    c = (current_ = p) < end_ ? *p++ : '\0';
  ------------------
  |  Branch (1376:9): [True: 13.7M, False: 564]
  ------------------
 1377|       |  // fractional part
 1378|  2.12M|  if (c == '.') {
  ------------------
  |  Branch (1378:7): [True: 5.99k, False: 2.12M]
  ------------------
 1379|  5.99k|    c = (current_ = p) < end_ ? *p++ : '\0';
  ------------------
  |  Branch (1379:9): [True: 5.97k, False: 12]
  ------------------
 1380|  4.15M|    while (c >= '0' && c <= '9')
  ------------------
  |  Branch (1380:12): [True: 4.15M, False: 2.40k]
  |  Branch (1380:24): [True: 4.15M, False: 3.58k]
  ------------------
 1381|  4.15M|      c = (current_ = p) < end_ ? *p++ : '\0';
  ------------------
  |  Branch (1381:11): [True: 4.15M, False: 42]
  ------------------
 1382|  5.99k|  }
 1383|       |  // exponential part
 1384|  2.12M|  if (c == 'e' || c == 'E') {
  ------------------
  |  Branch (1384:7): [True: 5.45k, False: 2.12M]
  |  Branch (1384:19): [True: 1.29k, False: 2.12M]
  ------------------
 1385|  6.74k|    c = (current_ = p) < end_ ? *p++ : '\0';
  ------------------
  |  Branch (1385:9): [True: 6.61k, False: 133]
  ------------------
 1386|  6.74k|    if (c == '+' || c == '-')
  ------------------
  |  Branch (1386:9): [True: 3.71k, False: 3.03k]
  |  Branch (1386:21): [True: 618, False: 2.41k]
  ------------------
 1387|  4.33k|      c = (current_ = p) < end_ ? *p++ : '\0';
  ------------------
  |  Branch (1387:11): [True: 4.27k, False: 58]
  ------------------
 1388|  19.2k|    while (c >= '0' && c <= '9')
  ------------------
  |  Branch (1388:12): [True: 13.2k, False: 5.98k]
  |  Branch (1388:24): [True: 12.4k, False: 769]
  ------------------
 1389|  12.4k|      c = (current_ = p) < end_ ? *p++ : '\0';
  ------------------
  |  Branch (1389:11): [True: 12.4k, False: 45]
  ------------------
 1390|  6.74k|  }
 1391|  2.12M|  return true;
 1392|  2.12M|}
_ZN4Json9OurReader10readStringEv:
 1393|  35.5k|bool OurReader::readString() {
 1394|  35.5k|  Char c = 0;
 1395|  8.00M|  while (current_ != end_) {
  ------------------
  |  Branch (1395:10): [True: 8.00M, False: 51]
  ------------------
 1396|  8.00M|    c = getNextChar();
 1397|  8.00M|    if (c == '\\')
  ------------------
  |  Branch (1397:9): [True: 12.6k, False: 7.99M]
  ------------------
 1398|  12.6k|      getNextChar();
 1399|  7.99M|    else if (c == '"')
  ------------------
  |  Branch (1399:14): [True: 35.5k, False: 7.96M]
  ------------------
 1400|  35.5k|      break;
 1401|  8.00M|  }
 1402|  35.5k|  return c == '"';
 1403|  35.5k|}
_ZN4Json9OurReader10readObjectERNS0_5TokenE:
 1417|  14.4k|bool OurReader::readObject(Token& token) {
 1418|  14.4k|  Token tokenName;
 1419|  14.4k|  String name;
 1420|  14.4k|  Value init(objectValue);
 1421|  14.4k|  currentValue().swapPayload(init);
 1422|  14.4k|  currentValue().setOffsetStart(token.start_ - begin_);
 1423|  35.7k|  while (readTokenSkippingComments(tokenName)) {
  ------------------
  |  Branch (1423:10): [True: 32.1k, False: 3.55k]
  ------------------
 1424|  32.1k|    if (tokenName.type_ == tokenObjectEnd &&
  ------------------
  |  Branch (1424:9): [True: 1.42k, False: 30.7k]
  ------------------
 1425|  32.1k|        (name.empty() ||
  ------------------
  |  Branch (1425:10): [True: 1.01k, False: 405]
  ------------------
 1426|  1.42k|         features_.allowTrailingCommas_)) // empty object or trailing comma
  ------------------
  |  Branch (1426:10): [True: 405, False: 0]
  ------------------
 1427|  1.42k|      return true;
 1428|  30.7k|    name.clear();
 1429|  30.7k|    if (tokenName.type_ == tokenString) {
  ------------------
  |  Branch (1429:9): [True: 30.6k, False: 125]
  ------------------
 1430|  30.6k|      if (!decodeString(tokenName, name))
  ------------------
  |  Branch (1430:11): [True: 3, False: 30.6k]
  ------------------
 1431|      3|        return recoverFromError(tokenObjectEnd);
 1432|  30.6k|    } else if (tokenName.type_ == tokenNumber && features_.allowNumericKeys_) {
  ------------------
  |  Branch (1432:16): [True: 35, False: 90]
  |  Branch (1432:50): [True: 0, False: 35]
  ------------------
 1433|      0|      Value numberName;
 1434|      0|      if (!decodeNumber(tokenName, numberName))
  ------------------
  |  Branch (1434:11): [True: 0, False: 0]
  ------------------
 1435|      0|        return recoverFromError(tokenObjectEnd);
 1436|      0|      name = numberName.asString();
 1437|    125|    } else {
 1438|    125|      break;
 1439|    125|    }
 1440|  30.6k|    if (name.length() >= (1U << 30))
  ------------------
  |  Branch (1440:9): [True: 0, False: 30.6k]
  ------------------
 1441|      0|      throwRuntimeError("keylength >= 2^30");
 1442|  30.6k|    if (features_.rejectDupKeys_ && currentValue().isMember(name)) {
  ------------------
  |  Branch (1442:9): [True: 0, False: 30.6k]
  |  Branch (1442:37): [True: 0, False: 0]
  ------------------
 1443|      0|      String msg = "Duplicate key: '" + name + "'";
 1444|      0|      return addErrorAndRecover(msg, tokenName, tokenObjectEnd);
 1445|      0|    }
 1446|       |
 1447|  30.6k|    Token colon;
 1448|  30.6k|    if (!readToken(colon) || colon.type_ != tokenMemberSeparator) {
  ------------------
  |  Branch (1448:9): [True: 4, False: 30.6k]
  |  Branch (1448:30): [True: 40, False: 30.6k]
  ------------------
 1449|     44|      return addErrorAndRecover("Missing ':' after object member name", colon,
 1450|     44|                                tokenObjectEnd);
 1451|     44|    }
 1452|  30.6k|    Value& value = currentValue()[name];
 1453|  30.6k|    nodes_.push(&value);
 1454|  30.6k|    bool ok = readValue();
 1455|  30.6k|    nodes_.pop();
 1456|  30.6k|    if (!ok) // error already set
  ------------------
  |  Branch (1456:9): [True: 9.08k, False: 21.5k]
  ------------------
 1457|  9.08k|      return recoverFromError(tokenObjectEnd);
 1458|       |
 1459|  21.5k|    Token comma;
 1460|  21.5k|    if (!readTokenSkippingComments(comma) ||
  ------------------
  |  Branch (1460:9): [True: 3.52k, False: 17.9k]
  ------------------
 1461|  21.5k|        (comma.type_ != tokenObjectEnd && comma.type_ != tokenArraySeparator)) {
  ------------------
  |  Branch (1461:10): [True: 17.7k, False: 209]
  |  Branch (1461:43): [True: 44, False: 17.7k]
  ------------------
 1462|     50|      return addErrorAndRecover("Missing ',' or '}' in object declaration",
 1463|     50|                                comma, tokenObjectEnd);
 1464|     50|    }
 1465|  21.4k|    if (comma.type_ == tokenObjectEnd)
  ------------------
  |  Branch (1465:9): [True: 209, False: 21.2k]
  ------------------
 1466|    209|      return true;
 1467|  21.4k|  }
 1468|  3.67k|  return addErrorAndRecover("Missing '}' or object member name", tokenName,
 1469|  3.67k|                            tokenObjectEnd);
 1470|  14.4k|}
_ZN4Json9OurReader9readArrayERNS0_5TokenE:
 1472|  64.7k|bool OurReader::readArray(Token& token) {
 1473|  64.7k|  Value init(arrayValue);
 1474|  64.7k|  currentValue().swapPayload(init);
 1475|  64.7k|  currentValue().setOffsetStart(token.start_ - begin_);
 1476|  64.7k|  int index = 0;
 1477|  1.36M|  for (;;) {
 1478|  1.36M|    skipSpaces();
 1479|  1.36M|    if (current_ != end_ && *current_ == ']' &&
  ------------------
  |  Branch (1479:9): [True: 1.36M, False: 294]
  |  Branch (1479:29): [True: 653, False: 1.36M]
  ------------------
 1480|  1.36M|        (index == 0 ||
  ------------------
  |  Branch (1480:10): [True: 231, False: 422]
  ------------------
 1481|    653|         (features_.allowTrailingCommas_ &&
  ------------------
  |  Branch (1481:11): [True: 422, False: 0]
  ------------------
 1482|    422|          !features_.allowDroppedNullPlaceholders_))) // empty array or trailing
  ------------------
  |  Branch (1482:11): [True: 422, False: 0]
  ------------------
 1483|       |                                                      // comma
 1484|    653|    {
 1485|    653|      Token endArray;
 1486|    653|      readToken(endArray);
 1487|    653|      return true;
 1488|    653|    }
 1489|  1.36M|    Value& value = currentValue()[index++];
 1490|  1.36M|    nodes_.push(&value);
 1491|  1.36M|    bool ok = readValue();
 1492|  1.36M|    nodes_.pop();
 1493|  1.36M|    if (!ok) // error already set
  ------------------
  |  Branch (1493:9): [True: 38.5k, False: 1.32M]
  ------------------
 1494|  38.5k|      return recoverFromError(tokenArrayEnd);
 1495|       |
 1496|  1.32M|    Token currentToken;
 1497|       |    // Accept Comment after last item in the array.
 1498|  1.32M|    ok = readTokenSkippingComments(currentToken);
 1499|  1.32M|    bool badTokenType = (currentToken.type_ != tokenArraySeparator &&
  ------------------
  |  Branch (1499:26): [True: 1.03k, False: 1.32M]
  ------------------
 1500|  1.32M|                         currentToken.type_ != tokenArrayEnd);
  ------------------
  |  Branch (1500:26): [True: 371, False: 665]
  ------------------
 1501|  1.32M|    if (!ok || badTokenType) {
  ------------------
  |  Branch (1501:9): [True: 24.5k, False: 1.29M]
  |  Branch (1501:16): [True: 276, False: 1.29M]
  ------------------
 1502|    371|      return addErrorAndRecover("Missing ',' or ']' in array declaration",
 1503|    371|                                currentToken, tokenArrayEnd);
 1504|    371|    }
 1505|  1.32M|    if (currentToken.type_ == tokenArrayEnd)
  ------------------
  |  Branch (1505:9): [True: 665, False: 1.32M]
  ------------------
 1506|    665|      break;
 1507|  1.32M|  }
 1508|  25.1k|  return true;
 1509|  64.7k|}
_ZN4Json9OurReader12decodeNumberERNS0_5TokenE:
 1511|  1.31M|bool OurReader::decodeNumber(Token& token) {
 1512|  1.31M|  Value decoded;
 1513|  1.31M|  if (!decodeNumber(token, decoded))
  ------------------
  |  Branch (1513:7): [True: 387, False: 1.31M]
  ------------------
 1514|    387|    return false;
 1515|  1.31M|  currentValue().swapPayload(decoded);
 1516|  1.31M|  currentValue().setOffsetStart(token.start_ - begin_);
 1517|  1.31M|  currentValue().setOffsetLimit(token.end_ - begin_);
 1518|  1.31M|  return true;
 1519|  1.31M|}
_ZN4Json9OurReader12decodeNumberERNS0_5TokenERNS_5ValueE:
 1521|  1.31M|bool OurReader::decodeNumber(Token& token, Value& decoded) {
 1522|       |  // Attempts to parse the number as an integer. If the number is
 1523|       |  // larger than the maximum supported value of an integer then
 1524|       |  // we decode the number as a double.
 1525|  1.31M|  Location current = token.start_;
 1526|  1.31M|  const bool isNegative = *current == '-';
 1527|  1.31M|  if (isNegative) {
  ------------------
  |  Branch (1527:7): [True: 14.2k, False: 1.29M]
  ------------------
 1528|  14.2k|    ++current;
 1529|  14.2k|  }
 1530|       |
 1531|       |  // We assume we can represent the largest and smallest integer types as
 1532|       |  // unsigned integers with separate sign. This is only true if they can fit
 1533|       |  // into an unsigned integer.
 1534|  1.31M|  static_assert(Value::maxLargestInt <= Value::maxLargestUInt,
 1535|  1.31M|                "Int must be smaller than UInt");
 1536|       |
 1537|       |  // We need to convert minLargestInt into a positive number. The easiest way
 1538|       |  // to do this conversion is to assume our "threshold" value of minLargestInt
 1539|       |  // divided by 10 can fit in maxLargestInt when absolute valued. This should
 1540|       |  // be a safe assumption.
 1541|  1.31M|  static_assert(Value::minLargestInt <= -Value::maxLargestInt,
 1542|  1.31M|                "The absolute value of minLargestInt must be greater than or "
 1543|  1.31M|                "equal to maxLargestInt");
 1544|  1.31M|  static_assert(Value::minLargestInt / 10 >= -Value::maxLargestInt,
 1545|  1.31M|                "The absolute value of minLargestInt must be only 1 magnitude "
 1546|  1.31M|                "larger than maxLargest Int");
 1547|       |
 1548|  1.31M|  static constexpr Value::LargestUInt positive_threshold =
 1549|  1.31M|      Value::maxLargestUInt / 10;
 1550|  1.31M|  static constexpr Value::UInt positive_last_digit = Value::maxLargestUInt % 10;
 1551|       |
 1552|       |  // For the negative values, we have to be more careful. Since typically
 1553|       |  // -Value::minLargestInt will cause an overflow, we first divide by 10 and
 1554|       |  // then take the inverse. This assumes that minLargestInt is only a single
 1555|       |  // power of 10 different in magnitude, which we check above. For the last
 1556|       |  // digit, we take the modulus before negating for the same reason.
 1557|  1.31M|  static constexpr auto negative_threshold =
 1558|  1.31M|      Value::LargestUInt(-(Value::minLargestInt / 10));
 1559|  1.31M|  static constexpr auto negative_last_digit =
 1560|  1.31M|      Value::UInt(-(Value::minLargestInt % 10));
 1561|       |
 1562|  1.31M|  const Value::LargestUInt threshold =
 1563|  1.31M|      isNegative ? negative_threshold : positive_threshold;
  ------------------
  |  Branch (1563:7): [True: 14.2k, False: 1.29M]
  ------------------
 1564|  1.31M|  const Value::UInt max_last_digit =
 1565|  1.31M|      isNegative ? negative_last_digit : positive_last_digit;
  ------------------
  |  Branch (1565:7): [True: 14.2k, False: 1.29M]
  ------------------
 1566|       |
 1567|  1.31M|  Value::LargestUInt value = 0;
 1568|  2.69M|  while (current < token.end_) {
  ------------------
  |  Branch (1568:10): [True: 1.38M, False: 1.30M]
  ------------------
 1569|  1.38M|    Char c = *current++;
 1570|  1.38M|    if (c < '0' || c > '9')
  ------------------
  |  Branch (1570:9): [True: 1.83k, False: 1.38M]
  |  Branch (1570:20): [True: 807, False: 1.38M]
  ------------------
 1571|  2.63k|      return decodeDouble(token, decoded);
 1572|       |
 1573|  1.38M|    const auto digit(static_cast<Value::UInt>(c - '0'));
 1574|  1.38M|    if (value >= threshold) {
  ------------------
  |  Branch (1574:9): [True: 2.88k, False: 1.38M]
  ------------------
 1575|       |      // We've hit or exceeded the max value divided by 10 (rounded down). If
 1576|       |      // a) we've only just touched the limit, meaning value == threshold,
 1577|       |      // b) this is the last digit, or
 1578|       |      // c) it's small enough to fit in that rounding delta, we're okay.
 1579|       |      // Otherwise treat this number as a double to avoid overflow.
 1580|  2.88k|      if (value > threshold || current != token.end_ ||
  ------------------
  |  Branch (1580:11): [True: 1.85k, False: 1.03k]
  |  Branch (1580:32): [True: 487, False: 551]
  ------------------
 1581|  2.88k|          digit > max_last_digit) {
  ------------------
  |  Branch (1581:11): [True: 197, False: 354]
  ------------------
 1582|  2.53k|        return decodeDouble(token, decoded);
 1583|  2.53k|      }
 1584|  2.88k|    }
 1585|  1.38M|    value = value * 10 + digit;
 1586|  1.38M|  }
 1587|       |
 1588|  1.30M|  if (isNegative) {
  ------------------
  |  Branch (1588:7): [True: 13.4k, False: 1.29M]
  ------------------
 1589|       |    // We use the same magnitude assumption here, just in case.
 1590|  13.4k|    const auto last_digit = static_cast<Value::UInt>(value % 10);
 1591|  13.4k|    decoded = -Value::LargestInt(value / 10) * 10 - last_digit;
 1592|  1.29M|  } else if (value <= Value::LargestUInt(Value::maxLargestInt)) {
  ------------------
  |  Branch (1592:14): [True: 1.29M, False: 437]
  ------------------
 1593|  1.29M|    decoded = Value::LargestInt(value);
 1594|  1.29M|  } else {
 1595|    437|    decoded = value;
 1596|    437|  }
 1597|       |
 1598|  1.30M|  return true;
 1599|  1.31M|}
_ZN4Json9OurReader12decodeDoubleERNS0_5TokenERNS_5ValueE:
 1611|  5.17k|bool OurReader::decodeDouble(Token& token, Value& decoded) {
 1612|  5.17k|  double value = 0;
 1613|  5.17k|  IStringStream is(String(token.start_, token.end_));
 1614|  5.17k|  if (!(is >> value)) {
  ------------------
  |  Branch (1614:7): [True: 643, False: 4.53k]
  ------------------
 1615|    643|    if (value == std::numeric_limits<double>::max())
  ------------------
  |  Branch (1615:9): [True: 0, False: 643]
  ------------------
 1616|      0|      value = std::numeric_limits<double>::infinity();
 1617|    643|    else if (value == std::numeric_limits<double>::lowest())
  ------------------
  |  Branch (1617:14): [True: 0, False: 643]
  ------------------
 1618|      0|      value = -std::numeric_limits<double>::infinity();
 1619|    643|    else if (!std::isinf(value))
  ------------------
  |  Branch (1619:14): [True: 387, False: 256]
  ------------------
 1620|    387|      return addError(
 1621|    387|          "'" + String(token.start_, token.end_) + "' is not a number.", token);
 1622|    643|  }
 1623|  4.78k|  decoded = value;
 1624|  4.78k|  return true;
 1625|  5.17k|}
_ZN4Json9OurReader12decodeStringERNS0_5TokenE:
 1627|  1.01k|bool OurReader::decodeString(Token& token) {
 1628|  1.01k|  String decoded_string;
 1629|  1.01k|  if (!decodeString(token, decoded_string))
  ------------------
  |  Branch (1629:7): [True: 157, False: 860]
  ------------------
 1630|    157|    return false;
 1631|    860|  Value decoded(decoded_string);
 1632|    860|  currentValue().swapPayload(decoded);
 1633|    860|  currentValue().setOffsetStart(token.start_ - begin_);
 1634|    860|  currentValue().setOffsetLimit(token.end_ - begin_);
 1635|    860|  return true;
 1636|  1.01k|}
_ZN4Json9OurReader12decodeStringERNS0_5TokenERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1638|  31.6k|bool OurReader::decodeString(Token& token, String& decoded) {
 1639|  31.6k|  decoded.reserve(static_cast<size_t>(token.end_ - token.start_ - 2));
 1640|  31.6k|  Location current = token.start_ + 1; // skip '"'
 1641|  31.6k|  Location end = token.end_ - 1;       // do not include '"'
 1642|  6.98M|  while (current != end) {
  ------------------
  |  Branch (1642:10): [True: 6.95M, False: 31.5k]
  ------------------
 1643|  6.95M|    Char c = *current++;
 1644|  6.95M|    if (c == '"')
  ------------------
  |  Branch (1644:9): [True: 0, False: 6.95M]
  ------------------
 1645|      0|      break;
 1646|  6.95M|    if (c == '\\') {
  ------------------
  |  Branch (1646:9): [True: 5.19k, False: 6.94M]
  ------------------
 1647|  5.19k|      if (current == end)
  ------------------
  |  Branch (1647:11): [True: 0, False: 5.19k]
  ------------------
 1648|      0|        return addError("Empty escape sequence in string", token, current);
 1649|  5.19k|      Char escape = *current++;
 1650|  5.19k|      switch (escape) {
 1651|    296|      case '"':
  ------------------
  |  Branch (1651:7): [True: 296, False: 4.89k]
  ------------------
 1652|    296|        decoded += '"';
 1653|    296|        break;
 1654|    267|      case '/':
  ------------------
  |  Branch (1654:7): [True: 267, False: 4.92k]
  ------------------
 1655|    267|        decoded += '/';
 1656|    267|        break;
 1657|    454|      case '\\':
  ------------------
  |  Branch (1657:7): [True: 454, False: 4.73k]
  ------------------
 1658|    454|        decoded += '\\';
 1659|    454|        break;
 1660|    214|      case 'b':
  ------------------
  |  Branch (1660:7): [True: 214, False: 4.97k]
  ------------------
 1661|    214|        decoded += '\b';
 1662|    214|        break;
 1663|    399|      case 'f':
  ------------------
  |  Branch (1663:7): [True: 399, False: 4.79k]
  ------------------
 1664|    399|        decoded += '\f';
 1665|    399|        break;
 1666|    684|      case 'n':
  ------------------
  |  Branch (1666:7): [True: 684, False: 4.50k]
  ------------------
 1667|    684|        decoded += '\n';
 1668|    684|        break;
 1669|    294|      case 'r':
  ------------------
  |  Branch (1669:7): [True: 294, False: 4.89k]
  ------------------
 1670|    294|        decoded += '\r';
 1671|    294|        break;
 1672|    317|      case 't':
  ------------------
  |  Branch (1672:7): [True: 317, False: 4.87k]
  ------------------
 1673|    317|        decoded += '\t';
 1674|    317|        break;
 1675|  2.26k|      case 'u': {
  ------------------
  |  Branch (1675:7): [True: 2.26k, False: 2.93k]
  ------------------
 1676|  2.26k|        unsigned int unicode;
 1677|  2.26k|        if (!decodeUnicodeCodePoint(token, current, end, unicode))
  ------------------
  |  Branch (1677:13): [True: 153, False: 2.10k]
  ------------------
 1678|    153|          return false;
 1679|  2.10k|        decoded += codePointToUTF8(unicode);
 1680|  2.10k|      } break;
 1681|      7|      default:
  ------------------
  |  Branch (1681:7): [True: 7, False: 5.18k]
  ------------------
 1682|      7|        return addError("Bad escape sequence in string", token, current);
 1683|  5.19k|      }
 1684|  6.94M|    } else {
 1685|  6.94M|      decoded += c;
 1686|  6.94M|    }
 1687|  6.95M|  }
 1688|  31.5k|  return true;
 1689|  31.6k|}
_ZN4Json9OurReader22decodeUnicodeCodePointERNS0_5TokenERPKcS4_Rj:
 1692|  2.26k|                                       Location end, unsigned int& unicode) {
 1693|       |
 1694|  2.26k|  if (!decodeUnicodeEscapeSequence(token, current, end, unicode))
  ------------------
  |  Branch (1694:7): [True: 104, False: 2.15k]
  ------------------
 1695|    104|    return false;
 1696|  2.15k|  if (unicode >= 0xD800 && unicode <= 0xDBFF) {
  ------------------
  |  Branch (1696:7): [True: 1.19k, False: 961]
  |  Branch (1696:28): [True: 668, False: 528]
  ------------------
 1697|       |    // surrogate pairs
 1698|    668|    if (end - current < 6)
  ------------------
  |  Branch (1698:9): [True: 16, False: 652]
  ------------------
 1699|     16|      return addError(
 1700|     16|          "additional six characters expected to parse unicode surrogate pair.",
 1701|     16|          token, current);
 1702|    652|    if (*(current++) == '\\' && *(current++) == 'u') {
  ------------------
  |  Branch (1702:9): [True: 640, False: 12]
  |  Branch (1702:33): [True: 627, False: 13]
  ------------------
 1703|    627|      unsigned int surrogatePair;
 1704|    627|      if (decodeUnicodeEscapeSequence(token, current, end, surrogatePair)) {
  ------------------
  |  Branch (1704:11): [True: 619, False: 8]
  ------------------
 1705|    619|        unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF);
 1706|    619|      } else
 1707|      8|        return false;
 1708|    627|    } else
 1709|     25|      return addError("expecting another \\u token to begin the second half of "
 1710|     25|                      "a unicode surrogate pair",
 1711|     25|                      token, current);
 1712|    652|  }
 1713|  2.10k|  return true;
 1714|  2.15k|}
_ZN4Json9OurReader27decodeUnicodeEscapeSequenceERNS0_5TokenERPKcS4_Rj:
 1718|  2.88k|                                            unsigned int& ret_unicode) {
 1719|  2.88k|  if (end - current < 4)
  ------------------
  |  Branch (1719:7): [True: 9, False: 2.87k]
  ------------------
 1720|      9|    return addError(
 1721|      9|        "Bad unicode escape sequence in string: four digits expected.", token,
 1722|      9|        current);
 1723|  2.87k|  int unicode = 0;
 1724|  14.1k|  for (int index = 0; index < 4; ++index) {
  ------------------
  |  Branch (1724:23): [True: 11.3k, False: 2.77k]
  ------------------
 1725|  11.3k|    Char c = *current++;
 1726|  11.3k|    unicode *= 16;
 1727|  11.3k|    if (c >= '0' && c <= '9')
  ------------------
  |  Branch (1727:9): [True: 11.3k, False: 45]
  |  Branch (1727:21): [True: 3.49k, False: 7.82k]
  ------------------
 1728|  3.49k|      unicode += c - '0';
 1729|  7.87k|    else if (c >= 'a' && c <= 'f')
  ------------------
  |  Branch (1729:14): [True: 4.12k, False: 3.75k]
  |  Branch (1729:26): [True: 4.09k, False: 21]
  ------------------
 1730|  4.09k|      unicode += c - 'a' + 10;
 1731|  3.77k|    else if (c >= 'A' && c <= 'F')
  ------------------
  |  Branch (1731:14): [True: 3.71k, False: 59]
  |  Branch (1731:26): [True: 3.66k, False: 44]
  ------------------
 1732|  3.66k|      unicode += c - 'A' + 10;
 1733|    103|    else
 1734|    103|      return addError(
 1735|    103|          "Bad unicode escape sequence in string: hexadecimal digit expected.",
 1736|    103|          token, current);
 1737|  11.3k|  }
 1738|  2.77k|  ret_unicode = static_cast<unsigned int>(unicode);
 1739|  2.77k|  return true;
 1740|  2.87k|}
_ZN4Json9OurReader8addErrorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS0_5TokenEPKc:
 1742|  2.79k|bool OurReader::addError(const String& message, Token& token, Location extra) {
 1743|  2.79k|  ErrorInfo info;
 1744|  2.79k|  info.token_ = token;
 1745|  2.79k|  info.message_ = message;
 1746|  2.79k|  info.extra_ = extra;
 1747|  2.79k|  errors_.push_back(info);
 1748|  2.79k|  return false;
 1749|  2.79k|}
_ZN4Json9OurReader16recoverFromErrorENS0_9TokenTypeE:
 1751|  48.2k|bool OurReader::recoverFromError(TokenType skipUntilToken) {
 1752|  48.2k|  size_t errorCount = errors_.size();
 1753|  48.2k|  Token skip;
 1754|  2.09M|  for (;;) {
 1755|  2.09M|    if (!readToken(skip))
  ------------------
  |  Branch (1755:9): [True: 274k, False: 1.82M]
  ------------------
 1756|   274k|      errors_.resize(errorCount); // discard errors caused by recovery
 1757|  2.09M|    if (skip.type_ == skipUntilToken || skip.type_ == tokenEndOfStream)
  ------------------
  |  Branch (1757:9): [True: 94, False: 2.09M]
  |  Branch (1757:41): [True: 48.1k, False: 2.05M]
  ------------------
 1758|  48.2k|      break;
 1759|  2.09M|  }
 1760|  48.2k|  errors_.resize(errorCount);
 1761|  48.2k|  return false;
 1762|  48.2k|}
_ZN4Json9OurReader18addErrorAndRecoverERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS0_5TokenENS0_9TokenTypeE:
 1765|    621|                                   TokenType skipUntilToken) {
 1766|    621|  addError(message, token);
 1767|    621|  return recoverFromError(skipUntilToken);
 1768|    621|}
_ZN4Json9OurReader12currentValueEv:
 1770|  6.87M|Value& OurReader::currentValue() { return *(nodes_.top()); }
_ZN4Json9OurReader11getNextCharEv:
 1772|  17.9M|OurReader::Char OurReader::getNextChar() {
 1773|  17.9M|  if (current_ == end_)
  ------------------
  |  Branch (1773:7): [True: 52.1k, False: 17.9M]
  ------------------
 1774|  52.1k|    return 0;
 1775|  17.9M|  return *current_++;
 1776|  17.9M|}
_ZN4Json17CharReaderBuilderC2Ev:
 1867|  3.43k|CharReaderBuilder::CharReaderBuilder() { setDefaults(&settings_); }
_ZN4Json17CharReaderBuilderD2Ev:
 1868|  3.43k|CharReaderBuilder::~CharReaderBuilder() = default;
_ZNK4Json17CharReaderBuilder13newCharReaderEv:
 1869|  3.43k|CharReader* CharReaderBuilder::newCharReader() const {
 1870|  3.43k|  bool collectComments = settings_["collectComments"].asBool();
 1871|  3.43k|  OurFeatures features = OurFeatures::all();
 1872|  3.43k|  features.allowComments_ = settings_["allowComments"].asBool();
 1873|  3.43k|  features.allowTrailingCommas_ = settings_["allowTrailingCommas"].asBool();
 1874|  3.43k|  features.strictRoot_ = settings_["strictRoot"].asBool();
 1875|  3.43k|  features.allowDroppedNullPlaceholders_ =
 1876|  3.43k|      settings_["allowDroppedNullPlaceholders"].asBool();
 1877|  3.43k|  features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool();
 1878|  3.43k|  features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool();
 1879|       |
 1880|       |  // Stack limit is always a size_t, so we get this as an unsigned int
 1881|       |  // regardless of it we have 64-bit integer support enabled.
 1882|  3.43k|  features.stackLimit_ = static_cast<size_t>(settings_["stackLimit"].asUInt());
 1883|  3.43k|  features.failIfExtra_ = settings_["failIfExtra"].asBool();
 1884|  3.43k|  features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool();
 1885|  3.43k|  features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool();
 1886|  3.43k|  features.skipBom_ = settings_["skipBom"].asBool();
 1887|  3.43k|  return new OurCharReader(collectComments, features);
 1888|  3.43k|}
_ZN4Json17CharReaderBuilder11setDefaultsEPNS_5ValueE:
 1937|  3.43k|void CharReaderBuilder::setDefaults(Json::Value* settings) {
 1938|       |  //! [CharReaderBuilderDefaults]
 1939|  3.43k|  (*settings)["collectComments"] = true;
 1940|  3.43k|  (*settings)["allowComments"] = true;
 1941|  3.43k|  (*settings)["allowTrailingCommas"] = true;
 1942|  3.43k|  (*settings)["strictRoot"] = false;
 1943|  3.43k|  (*settings)["allowDroppedNullPlaceholders"] = false;
 1944|  3.43k|  (*settings)["allowNumericKeys"] = false;
 1945|  3.43k|  (*settings)["allowSingleQuotes"] = false;
 1946|  3.43k|  (*settings)["stackLimit"] = 1000;
 1947|  3.43k|  (*settings)["failIfExtra"] = false;
 1948|  3.43k|  (*settings)["rejectDupKeys"] = false;
 1949|  3.43k|  (*settings)["allowSpecialFloats"] = false;
 1950|  3.43k|  (*settings)["skipBom"] = true;
 1951|       |  //! [CharReaderBuilderDefaults]
 1952|  3.43k|}
_ZN4Json10CharReader5parseEPKcS2_PNS_5ValueEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
 1976|  3.43k|                       String* errs) {
 1977|  3.43k|  return _impl->parse(beginDoc, endDoc, root, errs);
 1978|  3.43k|}
_ZN4Json13OurCharReaderC2EbRKNS_11OurFeaturesE:
 1838|  3.43k|      : CharReader(
 1839|  3.43k|            std::unique_ptr<OurImpl>(new OurImpl(collectComments, features))) {}
_ZN4Json13OurCharReader7OurImplC2EbRKNS_11OurFeaturesE:
 1845|  3.43k|        : collectComments_(collectComments), reader_(features) {}
_ZN4Json13OurCharReader7OurImpl5parseEPKcS3_PNS_5ValueEPNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
 1848|  3.43k|               String* errs) override {
 1849|  3.43k|      bool ok = reader_.parse(beginDoc, endDoc, *root, collectComments_);
 1850|  3.43k|      if (errs) {
  ------------------
  |  Branch (1850:11): [True: 0, False: 3.43k]
  ------------------
 1851|      0|        *errs = reader_.getFormattedErrorMessages();
 1852|      0|      }
 1853|  3.43k|      return ok;
 1854|  3.43k|    }
json_reader.cpp:_ZZN4Json9OurReader15containsNewLineEPKcS2_ENK3$_0clEc:
  976|  21.8G|  return std::any_of(begin, end, [](char b) { return b == '\n' || b == '\r'; });
  ------------------
  |  Branch (976:54): [True: 64.0k, False: 21.8G]
  |  Branch (976:67): [True: 53.9k, False: 21.8G]
  ------------------

json_reader.cpp:_ZN4JsonL15codePointToUTF8Ej:
   39|  2.10k|static inline String codePointToUTF8(unsigned int cp) {
   40|  2.10k|  String result;
   41|       |
   42|       |  // based on description from http://en.wikipedia.org/wiki/UTF-8
   43|       |
   44|  2.10k|  if (cp <= 0x7f) {
  ------------------
  |  Branch (44:7): [True: 349, False: 1.75k]
  ------------------
   45|    349|    result.resize(1);
   46|    349|    result[0] = static_cast<char>(cp);
   47|  1.75k|  } else if (cp <= 0x7FF) {
  ------------------
  |  Branch (47:14): [True: 384, False: 1.37k]
  ------------------
   48|    384|    result.resize(2);
   49|    384|    result[1] = static_cast<char>(0x80 | (0x3f & cp));
   50|    384|    result[0] = static_cast<char>(0xC0 | (0x1f & (cp >> 6)));
   51|  1.37k|  } else if (cp <= 0xFFFF) {
  ------------------
  |  Branch (51:14): [True: 756, False: 619]
  ------------------
   52|    756|    result.resize(3);
   53|    756|    result[2] = static_cast<char>(0x80 | (0x3f & cp));
   54|    756|    result[1] = static_cast<char>(0x80 | (0x3f & (cp >> 6)));
   55|    756|    result[0] = static_cast<char>(0xE0 | (0xf & (cp >> 12)));
   56|    756|  } else if (cp <= 0x10FFFF) {
  ------------------
  |  Branch (56:14): [True: 619, False: 0]
  ------------------
   57|    619|    result.resize(4);
   58|    619|    result[3] = static_cast<char>(0x80 | (0x3f & cp));
   59|    619|    result[2] = static_cast<char>(0x80 | (0x3f & (cp >> 6)));
   60|    619|    result[1] = static_cast<char>(0x80 | (0x3f & (cp >> 12)));
   61|    619|    result[0] = static_cast<char>(0xF0 | (0x7 & (cp >> 18)));
   62|    619|  }
   63|       |
   64|  2.10k|  return result;
   65|  2.10k|}

_ZN4Json5Value13nullSingletonEv:
   74|  1.46M|Value const& Value::nullSingleton() {
   75|  1.46M|  static Value const nullStatic;
   76|  1.46M|  return nullStatic;
   77|  1.46M|}
_ZN4Json9ExceptionC2ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  209|     28|Exception::Exception(String msg) : msg_(std::move(msg)) {}
_ZN4Json9ExceptionD2Ev:
  210|     28|Exception::~Exception() noexcept = default;
_ZN4Json12RuntimeErrorC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  212|     28|RuntimeError::RuntimeError(String const& msg) : Exception(msg) {}
_ZN4Json17throwRuntimeErrorERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  214|     28|JSONCPP_NORETURN void throwRuntimeError(String const& msg) {
  215|     28|  throw RuntimeError(msg);
  216|     28|}
_ZN4Json5Value8CZStringC2Ej:
  242|  1.36M|Value::CZString::CZString(ArrayIndex index) : cstr_(nullptr), index_(index) {}
_ZN4Json5Value8CZStringC2EPKcjNS1_17DuplicationPolicyE:
  246|   150k|    : cstr_(str) {
  247|       |  // allocate != duplicate
  248|   150k|  storage_.policy_ = allocate & 0x3;
  249|   150k|  storage_.length_ = length & 0x3FFFFFFF;
  250|   150k|}
_ZN4Json5Value8CZStringC2ERKS1_:
  252|  2.92M|Value::CZString::CZString(const CZString& other) {
  253|  2.92M|  cstr_ = (other.storage_.policy_ != noDuplication && other.cstr_ != nullptr
  ------------------
  |  Branch (253:12): [True: 2.14M, False: 775k]
  |  Branch (253:55): [True: 198k, False: 1.94M]
  ------------------
  254|  2.92M|               ? duplicateStringValue(other.cstr_, other.storage_.length_)
  255|  2.92M|               : other.cstr_);
  256|  2.92M|  storage_.policy_ =
  257|  2.92M|      static_cast<unsigned>(
  258|  2.92M|          other.cstr_
  ------------------
  |  Branch (258:11): [True: 198k, False: 2.72M]
  ------------------
  259|  2.92M|              ? (static_cast<DuplicationPolicy>(other.storage_.policy_) ==
  ------------------
  |  Branch (259:18): [True: 0, False: 198k]
  ------------------
  260|   198k|                         noDuplication
  261|   198k|                     ? noDuplication
  262|   198k|                     : duplicate)
  263|  2.92M|              : static_cast<DuplicationPolicy>(other.storage_.policy_)) &
  264|  2.92M|      3U;
  265|  2.92M|  storage_.length_ = other.storage_.length_;
  266|  2.92M|}
_ZN4Json5Value8CZStringD2Ev:
  273|  4.43M|Value::CZString::~CZString() {
  274|  4.43M|  if (cstr_ && storage_.policy_ == duplicate) {
  ------------------
  |  Branch (274:7): [True: 349k, False: 4.08M]
  |  Branch (274:16): [True: 198k, False: 150k]
  ------------------
  275|   198k|    releaseStringValue(const_cast<char*>(cstr_),
  276|   198k|                       storage_.length_ + 1U); // +1 for null terminating
  277|       |                                               // character for sake of
  278|       |                                               // completeness but not actually
  279|       |                                               // necessary
  280|   198k|  }
  281|  4.43M|}
_ZNK4Json5Value8CZStringltERKS1_:
  301|  37.5M|bool Value::CZString::operator<(const CZString& other) const {
  302|  37.5M|  if (!cstr_)
  ------------------
  |  Branch (302:7): [True: 36.8M, False: 686k]
  ------------------
  303|  36.8M|    return index_ < other.index_;
  304|       |  // return strcmp(cstr_, other.cstr_) < 0;
  305|       |  // Assume both are strings.
  306|   686k|  unsigned this_len = this->storage_.length_;
  307|   686k|  unsigned other_len = other.storage_.length_;
  308|   686k|  unsigned min_len = std::min<unsigned>(this_len, other_len);
  309|   686k|  JSON_ASSERT(this->cstr_ && other.cstr_);
  ------------------
  |  |   24|   686k|  do {                                                                         \
  |  |   25|  1.37M|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (25:11): [True: 686k, False: 0]
  |  |  |  Branch (25:11): [True: 686k, False: 0]
  |  |  ------------------
  |  |   26|      0|      Json::throwLogicError("assert json failed");                             \
  |  |   27|      0|    }                                                                          \
  |  |   28|   686k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (28:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  310|   686k|  int comp = memcmp(this->cstr_, other.cstr_, min_len);
  311|   686k|  if (comp < 0)
  ------------------
  |  Branch (311:7): [True: 348k, False: 337k]
  ------------------
  312|   348k|    return true;
  313|   337k|  if (comp > 0)
  ------------------
  |  Branch (313:7): [True: 168k, False: 169k]
  ------------------
  314|   168k|    return false;
  315|   169k|  return (this_len < other_len);
  316|   337k|}
_ZNK4Json5Value8CZStringeqERKS1_:
  318|  85.0k|bool Value::CZString::operator==(const CZString& other) const {
  319|  85.0k|  if (!cstr_)
  ------------------
  |  Branch (319:7): [True: 0, False: 85.0k]
  ------------------
  320|      0|    return index_ == other.index_;
  321|       |  // return strcmp(cstr_, other.cstr_) == 0;
  322|       |  // Assume both are strings.
  323|  85.0k|  unsigned this_len = this->storage_.length_;
  324|  85.0k|  unsigned other_len = other.storage_.length_;
  325|  85.0k|  if (this_len != other_len)
  ------------------
  |  Branch (325:7): [True: 52.0k, False: 33.0k]
  ------------------
  326|  52.0k|    return false;
  327|  33.0k|  JSON_ASSERT(this->cstr_ && other.cstr_);
  ------------------
  |  |   24|  33.0k|  do {                                                                         \
  |  |   25|  66.0k|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (25:11): [True: 33.0k, False: 0]
  |  |  |  Branch (25:11): [True: 33.0k, False: 0]
  |  |  ------------------
  |  |   26|      0|      Json::throwLogicError("assert json failed");                             \
  |  |   27|      0|    }                                                                          \
  |  |   28|  33.0k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (28:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  328|  33.0k|  int comp = memcmp(this->cstr_, other.cstr_, this_len);
  329|  33.0k|  return comp == 0;
  330|  85.0k|}
_ZN4Json5ValueC2ENS_9ValueTypeE:
  353|  1.40M|Value::Value(ValueType type) {
  354|  1.40M|  static char const emptyString[] = "";
  355|  1.40M|  initBasic(type);
  356|  1.40M|  switch (type) {
  357|  1.31M|  case nullValue:
  ------------------
  |  Branch (357:3): [True: 1.31M, False: 82.6k]
  ------------------
  358|  1.31M|    break;
  359|      0|  case intValue:
  ------------------
  |  Branch (359:3): [True: 0, False: 1.40M]
  ------------------
  360|      0|  case uintValue:
  ------------------
  |  Branch (360:3): [True: 0, False: 1.40M]
  ------------------
  361|      0|    value_.int_ = 0;
  362|      0|    break;
  363|      0|  case realValue:
  ------------------
  |  Branch (363:3): [True: 0, False: 1.40M]
  ------------------
  364|      0|    value_.real_ = 0.0;
  365|      0|    break;
  366|      0|  case stringValue:
  ------------------
  |  Branch (366:3): [True: 0, False: 1.40M]
  ------------------
  367|       |    // allocated_ == false, so this is safe.
  368|      0|    value_.string_ = const_cast<char*>(static_cast<char const*>(emptyString));
  369|      0|    break;
  370|  64.7k|  case arrayValue:
  ------------------
  |  Branch (370:3): [True: 64.7k, False: 1.33M]
  ------------------
  371|  82.6k|  case objectValue:
  ------------------
  |  Branch (371:3): [True: 17.9k, False: 1.38M]
  ------------------
  372|  82.6k|    value_.map_ = new ObjectValues();
  373|  82.6k|    break;
  374|      0|  case booleanValue:
  ------------------
  |  Branch (374:3): [True: 0, False: 1.40M]
  ------------------
  375|      0|    value_.bool_ = false;
  376|      0|    break;
  377|      0|  default:
  ------------------
  |  Branch (377:3): [True: 0, False: 1.40M]
  ------------------
  378|      0|    JSON_ASSERT_UNREACHABLE;
  ------------------
  |  |   52|      0|#define JSON_ASSERT_UNREACHABLE assert(false)
  ------------------
  379|  1.40M|  }
  380|  1.40M|}
_ZN4Json5ValueC2Ei:
  382|  3.43k|Value::Value(Int value) {
  383|  3.43k|  initBasic(intValue);
  384|  3.43k|  value_.int_ = value;
  385|  3.43k|}
_ZN4Json5ValueC2Ej:
  387|  37.7k|Value::Value(UInt value) {
  388|  37.7k|  initBasic(uintValue);
  389|  37.7k|  value_.uint_ = value;
  390|  37.7k|}
_ZN4Json5ValueC2El:
  392|  1.30M|Value::Value(Int64 value) {
  393|  1.30M|  initBasic(intValue);
  394|  1.30M|  value_.int_ = value;
  395|  1.30M|}
_ZN4Json5ValueC2Em:
  396|    437|Value::Value(UInt64 value) {
  397|    437|  initBasic(uintValue);
  398|    437|  value_.uint_ = value;
  399|    437|}
_ZN4Json5ValueC2Ed:
  402|  4.78k|Value::Value(double value) {
  403|  4.78k|  initBasic(realValue);
  404|  4.78k|  value_.real_ = value;
  405|  4.78k|}
_ZN4Json5ValueC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  421|    860|Value::Value(const String& value) {
  422|    860|  initBasic(stringValue, true);
  423|    860|  value_.string_ = duplicateAndPrefixStringValue(
  424|    860|      value.data(), static_cast<unsigned>(value.length()));
  425|    860|}
_ZN4Json5ValueC2Eb:
  440|  39.6k|Value::Value(bool value) {
  441|  39.6k|  initBasic(booleanValue);
  442|  39.6k|  value_.bool_ = value;
  443|  39.6k|}
_ZN4Json5ValueC2ERKS0_:
  445|  2.92M|Value::Value(const Value& other) {
  446|  2.92M|  dupPayload(other);
  447|  2.92M|  dupMeta(other);
  448|  2.92M|}
_ZN4Json5ValueD2Ev:
  455|  5.71M|Value::~Value() {
  456|  5.71M|  releasePayload();
  457|  5.71M|  value_.uint_ = 0;
  458|  5.71M|}
_ZN4Json5ValueaSEOS0_:
  465|  1.39M|Value& Value::operator=(Value&& other) noexcept {
  466|  1.39M|  other.swap(*this);
  467|  1.39M|  return *this;
  468|  1.39M|}
_ZN4Json5Value11swapPayloadERS0_:
  470|  2.78M|void Value::swapPayload(Value& other) {
  471|  2.78M|  std::swap(bits_, other.bits_);
  472|  2.78M|  std::swap(value_, other.value_);
  473|  2.78M|}
_ZN4Json5Value4swapERS0_:
  480|  1.39M|void Value::swap(Value& other) {
  481|  1.39M|  swapPayload(other);
  482|  1.39M|  std::swap(comments_, other.comments_);
  483|  1.39M|  std::swap(start_, other.start_);
  484|  1.39M|  std::swap(limit_, other.limit_);
  485|  1.39M|}
_ZNK4Json5Value4typeEv:
  492|  16.1M|ValueType Value::type() const {
  493|  16.1M|  return static_cast<ValueType>(bits_.value_type_);
  494|  16.1M|}
_ZNK4Json5Value6asUIntEv:
  705|  3.43k|Value::UInt Value::asUInt() const {
  706|  3.43k|  switch (type()) {
  707|  3.43k|  case intValue:
  ------------------
  |  Branch (707:3): [True: 3.43k, False: 0]
  ------------------
  708|  3.43k|    JSON_ASSERT_MESSAGE(isUInt(), "LargestInt out of UInt range");
  ------------------
  |  |   55|  3.43k|  do {                                                                         \
  |  |   56|  3.43k|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 0, False: 3.43k]
  |  |  ------------------
  |  |   57|      0|      JSON_FAIL_MESSAGE(message);                                              \
  |  |  ------------------
  |  |  |  |   31|      0|  do {                                                                         \
  |  |  |  |   32|      0|    OStringStream oss;                                                         \
  |  |  |  |   33|      0|    oss << message;                                                            \
  |  |  |  |   34|      0|    Json::throwLogicError(oss.str());                                          \
  |  |  |  |   35|      0|    abort();                                                                   \
  |  |  |  |   36|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|    }                                                                          \
  |  |   59|  3.43k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (59:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  709|  3.43k|    return UInt(value_.int_);
  710|      0|  case uintValue:
  ------------------
  |  Branch (710:3): [True: 0, False: 3.43k]
  ------------------
  711|      0|    JSON_ASSERT_MESSAGE(isUInt(), "LargestUInt out of UInt range");
  ------------------
  |  |   55|      0|  do {                                                                         \
  |  |   56|      0|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|      JSON_FAIL_MESSAGE(message);                                              \
  |  |  ------------------
  |  |  |  |   31|      0|  do {                                                                         \
  |  |  |  |   32|      0|    OStringStream oss;                                                         \
  |  |  |  |   33|      0|    oss << message;                                                            \
  |  |  |  |   34|      0|    Json::throwLogicError(oss.str());                                          \
  |  |  |  |   35|      0|    abort();                                                                   \
  |  |  |  |   36|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|    }                                                                          \
  |  |   59|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (59:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  712|      0|    return UInt(value_.uint_);
  713|      0|  case realValue:
  ------------------
  |  Branch (713:3): [True: 0, False: 3.43k]
  ------------------
  714|      0|    JSON_ASSERT_MESSAGE(InRange(value_.real_, 0u, maxUInt),
  ------------------
  |  |   55|      0|  do {                                                                         \
  |  |   56|      0|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|      JSON_FAIL_MESSAGE(message);                                              \
  |  |  ------------------
  |  |  |  |   31|      0|  do {                                                                         \
  |  |  |  |   32|      0|    OStringStream oss;                                                         \
  |  |  |  |   33|      0|    oss << message;                                                            \
  |  |  |  |   34|      0|    Json::throwLogicError(oss.str());                                          \
  |  |  |  |   35|      0|    abort();                                                                   \
  |  |  |  |   36|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|    }                                                                          \
  |  |   59|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (59:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  715|      0|                        "double out of UInt range");
  716|      0|    return UInt(value_.real_);
  717|      0|  case nullValue:
  ------------------
  |  Branch (717:3): [True: 0, False: 3.43k]
  ------------------
  718|      0|    return 0;
  719|      0|  case booleanValue:
  ------------------
  |  Branch (719:3): [True: 0, False: 3.43k]
  ------------------
  720|      0|    return value_.bool_ ? 1 : 0;
  ------------------
  |  Branch (720:12): [True: 0, False: 0]
  ------------------
  721|      0|  default:
  ------------------
  |  Branch (721:3): [True: 0, False: 3.43k]
  ------------------
  722|      0|    break;
  723|  3.43k|  }
  724|      0|  JSON_FAIL_MESSAGE("Value is not convertible to UInt.");
  ------------------
  |  |   31|      0|  do {                                                                         \
  |  |   32|      0|    OStringStream oss;                                                         \
  |  |   33|      0|    oss << message;                                                            \
  |  |   34|      0|    Json::throwLogicError(oss.str());                                          \
  |  |   35|      0|    abort();                                                                   \
  |  |   36|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  725|      0|}
_ZNK4Json5Value6asBoolEv:
  838|  37.7k|bool Value::asBool() const {
  839|  37.7k|  switch (type()) {
  840|  30.9k|  case booleanValue:
  ------------------
  |  Branch (840:3): [True: 30.9k, False: 6.87k]
  ------------------
  841|  30.9k|    return value_.bool_;
  842|      0|  case nullValue:
  ------------------
  |  Branch (842:3): [True: 0, False: 37.7k]
  ------------------
  843|      0|    return false;
  844|      0|  case intValue:
  ------------------
  |  Branch (844:3): [True: 0, False: 37.7k]
  ------------------
  845|      0|    return value_.int_ != 0;
  846|  6.87k|  case uintValue:
  ------------------
  |  Branch (846:3): [True: 6.87k, False: 30.9k]
  ------------------
  847|  6.87k|    return value_.uint_ != 0;
  848|      0|  case realValue: {
  ------------------
  |  Branch (848:3): [True: 0, False: 37.7k]
  ------------------
  849|       |    // According to JavaScript language zero or NaN is regarded as false
  850|      0|    const auto value_classification = std::fpclassify(value_.real_);
  851|      0|    return value_classification != FP_ZERO && value_classification != FP_NAN;
  ------------------
  |  Branch (851:12): [True: 0, False: 0]
  |  Branch (851:47): [True: 0, False: 0]
  ------------------
  852|      0|  }
  853|      0|  default:
  ------------------
  |  Branch (853:3): [True: 0, False: 37.7k]
  ------------------
  854|      0|    break;
  855|  37.7k|  }
  856|      0|  JSON_FAIL_MESSAGE("Value is not convertible to bool.");
  ------------------
  |  |   31|      0|  do {                                                                         \
  |  |   32|      0|    OStringStream oss;                                                         \
  |  |   33|      0|    oss << message;                                                            \
  |  |   34|      0|    Json::throwLogicError(oss.str());                                          \
  |  |   35|      0|    abort();                                                                   \
  |  |   36|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  857|      0|}
_ZN4Json5ValueixEj:
  959|  1.36M|Value& Value::operator[](ArrayIndex index) {
  960|  1.36M|  JSON_ASSERT_MESSAGE(
  ------------------
  |  |   55|  1.36M|  do {                                                                         \
  |  |   56|  2.72M|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (56:11): [True: 0, False: 1.36M]
  |  |  |  Branch (56:11): [True: 1.36M, False: 0]
  |  |  ------------------
  |  |   57|      0|      JSON_FAIL_MESSAGE(message);                                              \
  |  |  ------------------
  |  |  |  |   31|      0|  do {                                                                         \
  |  |  |  |   32|      0|    OStringStream oss;                                                         \
  |  |  |  |   33|      0|    oss << message;                                                            \
  |  |  |  |   34|      0|    Json::throwLogicError(oss.str());                                          \
  |  |  |  |   35|      0|    abort();                                                                   \
  |  |  |  |   36|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|    }                                                                          \
  |  |   59|  1.36M|  } while (0)
  |  |  ------------------
  |  |  |  Branch (59:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  961|  1.36M|      type() == nullValue || type() == arrayValue,
  962|  1.36M|      "in Json::Value::operator[](ArrayIndex): requires arrayValue");
  963|  1.36M|  if (type() == nullValue)
  ------------------
  |  Branch (963:7): [True: 0, False: 1.36M]
  ------------------
  964|      0|    *this = Value(arrayValue);
  965|  1.36M|  CZString key(index);
  966|  1.36M|  auto it = value_.map_->lower_bound(key);
  967|  1.36M|  if (it != value_.map_->end() && (*it).first == key)
  ------------------
  |  Branch (967:7): [True: 0, False: 1.36M]
  |  Branch (967:7): [True: 0, False: 1.36M]
  |  Branch (967:35): [True: 0, False: 0]
  ------------------
  968|      0|    return (*it).second;
  969|       |
  970|  1.36M|  ObjectValues::value_type defaultValue(key, nullSingleton());
  971|  1.36M|  it = value_.map_->insert(it, defaultValue);
  972|  1.36M|  return (*it).second;
  973|  1.36M|}
_ZN4Json5ValueixEi:
  975|  1.36M|Value& Value::operator[](int index) {
  976|  1.36M|  JSON_ASSERT_MESSAGE(
  ------------------
  |  |   55|  1.36M|  do {                                                                         \
  |  |   56|  1.36M|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 0, False: 1.36M]
  |  |  ------------------
  |  |   57|      0|      JSON_FAIL_MESSAGE(message);                                              \
  |  |  ------------------
  |  |  |  |   31|      0|  do {                                                                         \
  |  |  |  |   32|      0|    OStringStream oss;                                                         \
  |  |  |  |   33|      0|    oss << message;                                                            \
  |  |  |  |   34|      0|    Json::throwLogicError(oss.str());                                          \
  |  |  |  |   35|      0|    abort();                                                                   \
  |  |  |  |   36|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|    }                                                                          \
  |  |   59|  1.36M|  } while (0)
  |  |  ------------------
  |  |  |  Branch (59:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  977|  1.36M|      index >= 0,
  978|  1.36M|      "in Json::Value::operator[](int index): index cannot be negative");
  979|  1.36M|  return (*this)[ArrayIndex(index)];
  980|  1.36M|}
_ZN4Json5Value9initBasicENS_9ValueTypeEb:
 1002|  2.79M|void Value::initBasic(ValueType type, bool allocated) {
 1003|  2.79M|  setType(type);
 1004|  2.79M|  setIsAllocated(allocated);
 1005|  2.79M|  comments_ = Comments{};
 1006|  2.79M|  start_ = 0;
 1007|  2.79M|  limit_ = 0;
 1008|  2.79M|}
_ZN4Json5Value10dupPayloadERKS0_:
 1010|  2.92M|void Value::dupPayload(const Value& other) {
 1011|  2.92M|  setType(other.type());
 1012|  2.92M|  setIsAllocated(false);
 1013|  2.92M|  switch (type()) {
 1014|  2.92M|  case nullValue:
  ------------------
  |  Branch (1014:3): [True: 2.92M, False: 0]
  ------------------
 1015|  2.92M|  case intValue:
  ------------------
  |  Branch (1015:3): [True: 0, False: 2.92M]
  ------------------
 1016|  2.92M|  case uintValue:
  ------------------
  |  Branch (1016:3): [True: 0, False: 2.92M]
  ------------------
 1017|  2.92M|  case realValue:
  ------------------
  |  Branch (1017:3): [True: 0, False: 2.92M]
  ------------------
 1018|  2.92M|  case booleanValue:
  ------------------
  |  Branch (1018:3): [True: 0, False: 2.92M]
  ------------------
 1019|  2.92M|    value_ = other.value_;
 1020|  2.92M|    break;
 1021|      0|  case stringValue:
  ------------------
  |  Branch (1021:3): [True: 0, False: 2.92M]
  ------------------
 1022|      0|    if (other.value_.string_ && other.isAllocated()) {
  ------------------
  |  Branch (1022:9): [True: 0, False: 0]
  |  Branch (1022:33): [True: 0, False: 0]
  ------------------
 1023|      0|      unsigned len;
 1024|      0|      char const* str;
 1025|      0|      decodePrefixedString(other.isAllocated(), other.value_.string_, &len,
 1026|      0|                           &str);
 1027|      0|      value_.string_ = duplicateAndPrefixStringValue(str, len);
 1028|      0|      setIsAllocated(true);
 1029|      0|    } else {
 1030|      0|      value_.string_ = other.value_.string_;
 1031|      0|    }
 1032|      0|    break;
 1033|      0|  case arrayValue:
  ------------------
  |  Branch (1033:3): [True: 0, False: 2.92M]
  ------------------
 1034|      0|  case objectValue:
  ------------------
  |  Branch (1034:3): [True: 0, False: 2.92M]
  ------------------
 1035|      0|    value_.map_ = new ObjectValues(*other.value_.map_);
 1036|      0|    break;
 1037|      0|  default:
  ------------------
  |  Branch (1037:3): [True: 0, False: 2.92M]
  ------------------
 1038|      0|    JSON_ASSERT_UNREACHABLE;
  ------------------
  |  |   52|      0|#define JSON_ASSERT_UNREACHABLE assert(false)
  ------------------
 1039|  2.92M|  }
 1040|  2.92M|}
_ZN4Json5Value14releasePayloadEv:
 1042|  5.71M|void Value::releasePayload() {
 1043|  5.71M|  switch (type()) {
 1044|  4.24M|  case nullValue:
  ------------------
  |  Branch (1044:3): [True: 4.24M, False: 1.47M]
  ------------------
 1045|  5.55M|  case intValue:
  ------------------
  |  Branch (1045:3): [True: 1.30M, False: 4.40M]
  ------------------
 1046|  5.58M|  case uintValue:
  ------------------
  |  Branch (1046:3): [True: 38.2k, False: 5.67M]
  ------------------
 1047|  5.59M|  case realValue:
  ------------------
  |  Branch (1047:3): [True: 4.78k, False: 5.71M]
  ------------------
 1048|  5.63M|  case booleanValue:
  ------------------
  |  Branch (1048:3): [True: 39.6k, False: 5.67M]
  ------------------
 1049|  5.63M|    break;
 1050|    860|  case stringValue:
  ------------------
  |  Branch (1050:3): [True: 860, False: 5.71M]
  ------------------
 1051|    860|    if (isAllocated())
  ------------------
  |  Branch (1051:9): [True: 860, False: 0]
  ------------------
 1052|    860|      releasePrefixedStringValue(value_.string_);
 1053|    860|    break;
 1054|  64.7k|  case arrayValue:
  ------------------
  |  Branch (1054:3): [True: 64.7k, False: 5.65M]
  ------------------
 1055|  82.6k|  case objectValue:
  ------------------
  |  Branch (1055:3): [True: 17.9k, False: 5.69M]
  ------------------
 1056|  82.6k|    delete value_.map_;
 1057|  82.6k|    break;
 1058|      0|  default:
  ------------------
  |  Branch (1058:3): [True: 0, False: 5.71M]
  ------------------
 1059|      0|    JSON_ASSERT_UNREACHABLE;
  ------------------
  |  |   52|      0|#define JSON_ASSERT_UNREACHABLE assert(false)
  ------------------
 1060|  5.71M|  }
 1061|  5.71M|}
_ZN4Json5Value7dupMetaERKS0_:
 1063|  2.92M|void Value::dupMeta(const Value& other) {
 1064|  2.92M|  comments_ = other.comments_;
 1065|  2.92M|  start_ = other.start_;
 1066|  2.92M|  limit_ = other.limit_;
 1067|  2.92M|}
_ZN4Json5Value16resolveReferenceEPKcS2_:
 1091|   109k|Value& Value::resolveReference(char const* key, char const* end) {
 1092|   109k|  JSON_ASSERT_MESSAGE(
  ------------------
  |  |   55|   109k|  do {                                                                         \
  |  |   56|   215k|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (56:11): [True: 3.43k, False: 106k]
  |  |  |  Branch (56:11): [True: 106k, False: 0]
  |  |  ------------------
  |  |   57|      0|      JSON_FAIL_MESSAGE(message);                                              \
  |  |  ------------------
  |  |  |  |   31|      0|  do {                                                                         \
  |  |  |  |   32|      0|    OStringStream oss;                                                         \
  |  |  |  |   33|      0|    oss << message;                                                            \
  |  |  |  |   34|      0|    Json::throwLogicError(oss.str());                                          \
  |  |  |  |   35|      0|    abort();                                                                   \
  |  |  |  |   36|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|    }                                                                          \
  |  |   59|   109k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (59:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1093|   109k|      type() == nullValue || type() == objectValue,
 1094|   109k|      "in Json::Value::resolveReference(key, end): requires objectValue");
 1095|   109k|  if (type() == nullValue)
  ------------------
  |  Branch (1095:7): [True: 3.43k, False: 106k]
  ------------------
 1096|  3.43k|    *this = Value(objectValue);
 1097|   109k|  CZString actualKey(key, static_cast<unsigned>(end - key),
 1098|   109k|                     CZString::duplicateOnCopy);
 1099|   109k|  auto it = value_.map_->lower_bound(actualKey);
 1100|   109k|  if (it != value_.map_->end() && (*it).first == actualKey)
  ------------------
  |  Branch (1100:7): [True: 85.0k, False: 24.6k]
  |  Branch (1100:7): [True: 10.4k, False: 99.1k]
  |  Branch (1100:35): [True: 10.4k, False: 74.5k]
  ------------------
 1101|  10.4k|    return (*it).second;
 1102|       |
 1103|  99.1k|  ObjectValues::value_type defaultValue(actualKey, nullSingleton());
 1104|  99.1k|  it = value_.map_->insert(it, defaultValue);
 1105|  99.1k|  Value& value = (*it).second;
 1106|  99.1k|  return value;
 1107|   109k|}
_ZNK4Json5Value4findEPKcS2_:
 1116|  41.2k|Value const* Value::find(char const* begin, char const* end) const {
 1117|  41.2k|  JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue,
  ------------------
  |  |   55|  41.2k|  do {                                                                         \
  |  |   56|  82.4k|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (56:11): [True: 0, False: 41.2k]
  |  |  |  Branch (56:11): [True: 41.2k, False: 0]
  |  |  ------------------
  |  |   57|      0|      JSON_FAIL_MESSAGE(message);                                              \
  |  |  ------------------
  |  |  |  |   31|      0|  do {                                                                         \
  |  |  |  |   32|      0|    OStringStream oss;                                                         \
  |  |  |  |   33|      0|    oss << message;                                                            \
  |  |  |  |   34|      0|    Json::throwLogicError(oss.str());                                          \
  |  |  |  |   35|      0|    abort();                                                                   \
  |  |  |  |   36|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|    }                                                                          \
  |  |   59|  41.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (59:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1118|  41.2k|                      "in Json::Value::find(begin, end): requires "
 1119|  41.2k|                      "objectValue or nullValue");
 1120|  41.2k|  if (type() == nullValue)
  ------------------
  |  Branch (1120:7): [True: 0, False: 41.2k]
  ------------------
 1121|      0|    return nullptr;
 1122|  41.2k|  CZString actualKey(begin, static_cast<unsigned>(end - begin),
 1123|  41.2k|                     CZString::noDuplication);
 1124|  41.2k|  ObjectValues::const_iterator it = value_.map_->find(actualKey);
 1125|  41.2k|  if (it == value_.map_->end())
  ------------------
  |  Branch (1125:7): [True: 0, False: 41.2k]
  ------------------
 1126|      0|    return nullptr;
 1127|  41.2k|  return &(*it).second;
 1128|  41.2k|}
_ZNK4Json5ValueixENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
 1177|  41.2k|const Value& Value::operator[](std::string_view key) const {
 1178|  41.2k|  Value const* found = find(key.data(), key.data() + key.length());
 1179|  41.2k|  if (!found)
  ------------------
  |  Branch (1179:7): [True: 0, False: 41.2k]
  ------------------
 1180|      0|    return nullSingleton();
 1181|  41.2k|  return *found;
 1182|  41.2k|}
_ZN4Json5ValueixENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
 1183|   109k|Value& Value::operator[](std::string_view key) {
 1184|   109k|  return resolveReference(key.data(), key.data() + key.length());
 1185|   109k|}
_ZNK4Json5Value6isUIntEv:
 1396|  3.43k|bool Value::isUInt() const {
 1397|  3.43k|  switch (type()) {
 1398|  3.43k|  case intValue:
  ------------------
  |  Branch (1398:3): [True: 3.43k, False: 0]
  ------------------
 1399|  3.43k|#if defined(JSON_HAS_INT64)
 1400|  3.43k|    return value_.int_ >= 0 && LargestUInt(value_.int_) <= LargestUInt(maxUInt);
  ------------------
  |  Branch (1400:12): [True: 3.43k, False: 0]
  |  Branch (1400:32): [True: 3.43k, False: 0]
  ------------------
 1401|       |#else
 1402|       |    return value_.int_ >= 0;
 1403|       |#endif
 1404|      0|  case uintValue:
  ------------------
  |  Branch (1404:3): [True: 0, False: 3.43k]
  ------------------
 1405|      0|#if defined(JSON_HAS_INT64)
 1406|      0|    return value_.uint_ <= maxUInt;
 1407|       |#else
 1408|       |    return true;
 1409|       |#endif
 1410|      0|  case realValue:
  ------------------
  |  Branch (1410:3): [True: 0, False: 3.43k]
  ------------------
 1411|      0|    return value_.real_ >= 0 && value_.real_ <= maxUInt &&
  ------------------
  |  Branch (1411:12): [True: 0, False: 0]
  |  Branch (1411:33): [True: 0, False: 0]
  ------------------
 1412|      0|           IsIntegral(value_.real_);
  ------------------
  |  Branch (1412:12): [True: 0, False: 0]
  ------------------
 1413|      0|  default:
  ------------------
  |  Branch (1413:3): [True: 0, False: 3.43k]
  ------------------
 1414|      0|    break;
 1415|  3.43k|  }
 1416|      0|  return false;
 1417|  3.43k|}
_ZN4Json5Value8CommentsC2EOS1_:
 1505|  1.39M|    : ptr_{std::move(that.ptr_)} {}
_ZN4Json5Value8CommentsaSERKS1_:
 1507|  2.92M|Value::Comments& Value::Comments::operator=(const Comments& that) {
 1508|  2.92M|  ptr_ = cloneUnique(that.ptr_);
 1509|  2.92M|  return *this;
 1510|  2.92M|}
_ZN4Json5Value8CommentsaSEOS1_:
 1512|  5.58M|Value::Comments& Value::Comments::operator=(Comments&& that) noexcept {
 1513|  5.58M|  ptr_ = std::move(that.ptr_);
 1514|  5.58M|  return *this;
 1515|  5.58M|}
_ZN4Json5Value8Comments3setENS_16CommentPlacementENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1527|  4.07k|void Value::Comments::set(CommentPlacement slot, String comment) {
 1528|  4.07k|  if (slot >= CommentPlacement::numberOfCommentPlacement)
  ------------------
  |  Branch (1528:7): [True: 0, False: 4.07k]
  ------------------
 1529|      0|    return;
 1530|  4.07k|  if (!ptr_)
  ------------------
  |  Branch (1530:7): [True: 3.52k, False: 559]
  ------------------
 1531|  3.52k|    ptr_ = std::unique_ptr<Array>(new Array());
 1532|  4.07k|  (*ptr_)[slot] = std::move(comment);
 1533|  4.07k|}
_ZN4Json5Value10setCommentENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_16CommentPlacementE:
 1535|  4.07k|void Value::setComment(String comment, CommentPlacement placement) {
 1536|  4.07k|  if (!comment.empty() && (comment.back() == '\n')) {
  ------------------
  |  Branch (1536:7): [True: 4.07k, False: 0]
  |  Branch (1536:27): [True: 2.68k, False: 1.39k]
  ------------------
 1537|       |    // Always discard trailing newline, to aid indentation.
 1538|  2.68k|    comment.pop_back();
 1539|  2.68k|  }
 1540|  4.07k|  JSON_ASSERT_MESSAGE(
  ------------------
  |  |   55|  4.07k|  do {                                                                         \
  |  |   56|  8.15k|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (56:11): [True: 0, False: 4.07k]
  |  |  |  Branch (56:11): [True: 4.07k, False: 0]
  |  |  ------------------
  |  |   57|      0|      JSON_FAIL_MESSAGE(message);                                              \
  |  |  ------------------
  |  |  |  |   31|      0|  do {                                                                         \
  |  |  |  |   32|      0|    OStringStream oss;                                                         \
  |  |  |  |   33|      0|    oss << message;                                                            \
  |  |  |  |   34|      0|    Json::throwLogicError(oss.str());                                          \
  |  |  |  |   35|      0|    abort();                                                                   \
  |  |  |  |   36|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|    }                                                                          \
  |  |   59|  4.07k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (59:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1541|  4.07k|      comment.empty() || comment[0] == '/',
 1542|  4.07k|      "in Json::Value::setComment(): Comments must start with /");
 1543|  4.07k|  comments_.set(placement, std::move(comment));
 1544|  4.07k|}
_ZN4Json5Value14setOffsetStartEl:
 1554|  1.39M|void Value::setOffsetStart(ptrdiff_t start) { start_ = start; }
_ZN4Json5Value14setOffsetLimitEl:
 1556|  1.36M|void Value::setOffsetLimit(ptrdiff_t limit) { limit_ = limit; }
json_value.cpp:_ZN4JsonL20duplicateStringValueEPKcm:
  121|   198k|static inline char* duplicateStringValue(const char* value, size_t length) {
  122|       |  // Avoid an integer overflow in the call to malloc below by limiting length
  123|       |  // to a sane value.
  124|   198k|  if (length >= static_cast<size_t>(Value::maxInt))
  ------------------
  |  Branch (124:7): [True: 0, False: 198k]
  ------------------
  125|      0|    length = Value::maxInt - 1;
  126|       |
  127|   198k|  auto newString = static_cast<char*>(malloc(length + 1));
  128|   198k|  if (newString == nullptr) {
  ------------------
  |  Branch (128:7): [True: 0, False: 198k]
  ------------------
  129|      0|    throwRuntimeError("in Json::Value::duplicateStringValue(): "
  130|      0|                      "Failed to allocate string value buffer");
  131|      0|  }
  132|   198k|  memcpy(newString, value, length);
  133|   198k|  newString[length] = 0;
  134|   198k|  return newString;
  135|   198k|}
json_value.cpp:_ZN4JsonL18releaseStringValueEPcj:
  189|   198k|static inline void releaseStringValue(char* value, unsigned) { free(value); }
json_value.cpp:_ZN4JsonL29duplicateAndPrefixStringValueEPKcj:
  140|    860|                                                  unsigned int length) {
  141|       |  // Avoid an integer overflow in the call to malloc below by limiting length
  142|       |  // to a sane value.
  143|    860|  JSON_ASSERT_MESSAGE(length <= static_cast<unsigned>(Value::maxInt) -
  ------------------
  |  |   55|    860|  do {                                                                         \
  |  |   56|    860|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 0, False: 860]
  |  |  ------------------
  |  |   57|      0|      JSON_FAIL_MESSAGE(message);                                              \
  |  |  ------------------
  |  |  |  |   31|      0|  do {                                                                         \
  |  |  |  |   32|      0|    OStringStream oss;                                                         \
  |  |  |  |   33|      0|    oss << message;                                                            \
  |  |  |  |   34|      0|    Json::throwLogicError(oss.str());                                          \
  |  |  |  |   35|      0|    abort();                                                                   \
  |  |  |  |   36|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|    }                                                                          \
  |  |   59|    860|  } while (0)
  |  |  ------------------
  |  |  |  Branch (59:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  144|    860|                                    sizeof(unsigned) - 1U,
  145|    860|                      "in Json::Value::duplicateAndPrefixStringValue(): "
  146|    860|                      "length too big for prefixing");
  147|    860|  size_t actualLength = sizeof(length) + length + 1;
  148|    860|  auto newString = static_cast<char*>(malloc(actualLength));
  149|    860|  if (newString == nullptr) {
  ------------------
  |  Branch (149:7): [True: 0, False: 860]
  ------------------
  150|      0|    throwRuntimeError("in Json::Value::duplicateAndPrefixStringValue(): "
  151|      0|                      "Failed to allocate string value buffer");
  152|      0|  }
  153|    860|  *reinterpret_cast<unsigned*>(newString) = length;
  154|    860|  memcpy(newString + sizeof(unsigned), value, length);
  155|    860|  newString[actualLength - 1U] =
  156|    860|      0; // to avoid buffer over-run accidents by users later
  157|    860|  return newString;
  158|    860|}
json_value.cpp:_ZN4JsonL26releasePrefixedStringValueEPc:
  188|    860|static inline void releasePrefixedStringValue(char* value) { free(value); }
json_value.cpp:_ZN4JsonL11cloneUniqueINSt3__15arrayINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm3EEEEENS1_10unique_ptrIT_NS1_14default_deleteISB_EEEERKSE_:
   56|  2.92M|static std::unique_ptr<T> cloneUnique(const std::unique_ptr<T>& p) {
   57|  2.92M|  std::unique_ptr<T> r;
   58|  2.92M|  if (p) {
  ------------------
  |  Branch (58:7): [True: 0, False: 2.92M]
  ------------------
   59|      0|    r = std::unique_ptr<T>(new T(*p));
   60|      0|  }
   61|  2.92M|  return r;
   62|  2.92M|}

LLVMFuzzerTestOneInput:
   18|  3.43k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   19|  3.43k|  Json::CharReaderBuilder builder;
   20|       |
   21|  3.43k|  if (size < sizeof(uint32_t)) {
  ------------------
  |  Branch (21:7): [True: 2, False: 3.43k]
  ------------------
   22|      2|    return 0;
   23|      2|  }
   24|       |
   25|  3.43k|  const uint32_t hash_settings = static_cast<uint32_t>(data[0]) |
   26|  3.43k|                                 (static_cast<uint32_t>(data[1]) << 8) |
   27|  3.43k|                                 (static_cast<uint32_t>(data[2]) << 16) |
   28|  3.43k|                                 (static_cast<uint32_t>(data[3]) << 24);
   29|  3.43k|  data += sizeof(uint32_t);
   30|  3.43k|  size -= sizeof(uint32_t);
   31|       |
   32|  3.43k|  builder.settings_["failIfExtra"] = hash_settings & (1 << 0);
   33|  3.43k|  builder.settings_["allowComments_"] = hash_settings & (1 << 1);
   34|  3.43k|  builder.settings_["strictRoot_"] = hash_settings & (1 << 2);
   35|  3.43k|  builder.settings_["allowDroppedNullPlaceholders_"] = hash_settings & (1 << 3);
   36|  3.43k|  builder.settings_["allowNumericKeys_"] = hash_settings & (1 << 4);
   37|  3.43k|  builder.settings_["allowSingleQuotes_"] = hash_settings & (1 << 5);
   38|  3.43k|  builder.settings_["failIfExtra_"] = hash_settings & (1 << 6);
   39|  3.43k|  builder.settings_["rejectDupKeys_"] = hash_settings & (1 << 7);
   40|  3.43k|  builder.settings_["allowSpecialFloats_"] = hash_settings & (1 << 8);
   41|  3.43k|  builder.settings_["collectComments"] = hash_settings & (1 << 9);
   42|  3.43k|  builder.settings_["allowTrailingCommas_"] = hash_settings & (1 << 10);
   43|       |
   44|  3.43k|  std::unique_ptr<Json::CharReader> reader(builder.newCharReader());
   45|       |
   46|  3.43k|  Json::Value root;
   47|  3.43k|  const auto data_str = reinterpret_cast<const char*>(data);
   48|  3.43k|  try {
   49|  3.43k|    reader->parse(data_str, data_str + size, &root, nullptr);
   50|  3.43k|  } catch (Json::Exception const&) {
   51|     28|  }
   52|       |  // Whether it succeeded or not doesn't matter.
   53|  3.43k|  return 0;
   54|  3.43k|}

