This code is a C++ implementation  for a branch prediction.