Do not assume that sizeof(int)==sizeof(unsigned long long) and cast as needed.