Language: C++

#ifdef _WIN32
#include "XOR.h"
#endif

#include <stdio.h>

#include <iostream>
#include <vector>
#include <array>

constexpr int64_t MOD = 1'000'000'007;
constexpr int64_t help = 1;

#define ll long long int

void fastscan(ll& number) {
	//variable to indicate sign of input number 
	bool negative = false;
	register int c;

	number = 0;

	// extract current character from buffer 
	c = getchar();

	// Keep on extracting characters if they are integers 
	// i.e ASCII Value lies from '0'(48) to '9' (57) 
	for (; (c > 47 && c < 58); c = getchar())
		number = number * 10 + c - 48;

	// if scanned input has a negative sign, negate the 
	// value of the input number 
}
#ifdef _WIN32
namespace XOR
{
#endif 

	int main() {
		int64_t n;

		fastscan(n);


		std::array<uint64_t, 62> bits{};
		for (int64_t i = 0; i < n; i++) {
			int64_t d;
			fastscan(d);
			for (int64_t b = 0; b < 62; b++) {
				bits[b] += !!(d & (help << b));
			}
		}

		int64_t ans = 0;

		for (int64_t b = 0; b < 62; b++) {
			int64_t p = (help << b) % MOD;
			ans += (bits[b] * (n - bits[b]) % MOD) * p;
			ans %= MOD;
		}

		std::cout << ans;
	}
#ifdef _WIN32
}
#endif 


Compiler output:
a.cc: In function 'void fastscan(long long int&)':
a.cc:19:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   19 |         register int c;
      |                      ^
a.cc: In function 'int main()':
a.cc:42:26: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int64_t' {aka 'long int'}
   42 |                 fastscan(n);
      |                          ^
a.cc:16:19: note:   initializing argument 1 of 'void fastscan(long long int&)'
   16 | void fastscan(ll& number) {
      |                   ^
a.cc:45:28: error: 'uint64_t' was not declared in this scope
   45 |                 std::array<uint64_t, 62> bits{};
      |                            ^~~~~~~~
a.cc:10:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    9 | #include <array>
  +++ |+#include <cstdint>
   10 | 
a.cc:45:40: error: template argument 1 is invalid
   45 |                 std::array<uint64_t, 62> bits{};
      |                                        ^
a.cc:48:34: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int64_t' {aka 'long int'}
   48 |                         fastscan(d);
      |                                  ^
a.cc:16:19: note:   initializing argument 1 of 'void fastscan(long long int&)'
   16 | void fastscan(ll& number) {
      |                   ^
a.cc:50:37: error: invalid types 'int[int64_t {aka long int}]' for array subscript
   50 |                                 bits[b] += !!(d & (help << b));
      |                                     ^
a.cc:58:37: error: invalid types 'int[int64_t {aka long int}]' for array subscript
   58 |                         ans += (bits[b] * (n - bits[b]) % MOD) * p;
      |                                     ^
a.cc:58:52: error: invalid types 'int[int64_t {aka long int}]' for array subscript
   58 |                         ans += (bits[b] * (n - bits[b]) % MOD) * p;
      |                                                    ^