/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <iostream>
using namespace std;
using joaat_t = std::uint32_t;
inline constexpr char joaat_to_lower(char c)
{
return (c >= 'A' && c <= 'Z') ? c + ('a' - 'A') : c;
}
inline joaat_t joaat(const char *str)
{
joaat_t hash = 0;
while (*str)
{
hash += joaat_to_lower(*(str++));
hash += (hash << 10);
hash ^= (hash >> 6);
}
hash += (hash << 3);
hash ^= (hash >> 11);
hash += (hash << 15);
return hash;
}
int main()
{
cout << "AutomaticSMG 0x" << std::hex << std::uppercase << joaat("AutomaticSMG") << endl;
cout << "WAPClip 0x" << std::hex << std::uppercase << joaat("WAPClip") << endl;
cout << "COMPONENT_MICROSMG_CLIP_01 0x" << std::hex << std::uppercase << joaat("COMPONENT_MICROSMG_CLIP_01") << endl;
cout << "COMPONENT_MICROSMG_CLIP_02 0x" << std::hex << std::uppercase << joaat("COMPONENT_MICROSMG_CLIP_02") << endl;
cout << "WAPFlshLasr 0x" << std::hex << std::uppercase << joaat("WAPFlshLasr") << endl;
cout << "WAPScop 0x" << std::hex << std::uppercase << joaat("WAPScop") << endl;
cout << "COMPONENT_AT_SCOPE_MACRO 0x" << std::hex << std::uppercase << joaat("COMPONENT_AT_SCOPE_MACRO") << endl;
cout << "WAPSupp 0x" << std::hex << std::uppercase << joaat("WAPSupp") << endl;
cout << "COMPONENT_AT_AR_SUPP_02 0x" << std::hex << std::uppercase << joaat("COMPONENT_AT_AR_SUPP_02") << endl;
cout << "TINT_DEFAULT 0x" << std::hex << std::uppercase << joaat("TINT_DEFAULT") << endl;
return 0;
}