//
// __popcountdi2 from 0x1105834 to 0x1105868 (52 bytes)
//
// 2 xrefs:
// > sub_F417B8 @ 0xf4183c
// > ??> @ 0x9b068
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:18:28 +0000
//
unsigned __int64 __fastcall _popcountdi2(unsigned __int64 a1)
{
unsigned __int64 v1; // x0
v1 = (((a1 - ((a1 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)
+ ((a1 - ((a1 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL);
return (0x101010101010101LL * ((v1 + (v1 >> 4)) & 0xF0F0F0F0F0F0F0FLL)) >> 56;
}