//
// sub_1005772B0 from 0x1005772b0 to 0x1005772ee (62 bytes)
//
// 12 xrefs:
// > cocos2d::CCTexturePVR::unpackPVRv2Data @ 0x100284e37
// > cocos2d::CCTexturePVR::unpackPVRv2Data @ 0x100284e48
// > cocos2d::CCTexturePVR::createGLTexture @ 0x100285324
// > cocos2d::CCTexturePVR::createGLTexture @ 0x100285431
// > cocos2d::CCTexture2D::generateMipmap @ 0x1004794b1
// > cocos2d::CCTexture2D::generateMipmap @ 0x1004794be
// > cocos2d::CCTexture2D::setTexParameters @ 0x100479507
// > cocos2d::CCTexture2D::setTexParameters @ 0x10047951e
// > cocos2d::CCGridBase::initWithSize_1 @ 0x1004e35f0
// > cocos2d::CCGridBase::initWithSize_1 @ 0x1004e3600
// > cocos2d::CCRenderTexture::initWithWidthAndHeight @ 0x1005f547d
// > cocos2d::CCRenderTexture::initWithWidthAndHeight @ 0x1005f5488
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_1005772B0(__int64 a1)
{
unsigned __int64 v1; // rdx
v1 = (a1 - 1)
| ((unsigned __int64)(a1 - 1) >> 1)
| (((a1 - 1) | ((unsigned __int64)(a1 - 1) >> 1)) >> 2)
| (((a1 - 1) | ((unsigned __int64)(a1 - 1) >> 1) | (((a1 - 1) | ((unsigned __int64)(a1 - 1) >> 1)) >> 2)) >> 4)
| (((a1 - 1)
| ((unsigned __int64)(a1 - 1) >> 1)
| (((a1 - 1) | ((unsigned __int64)(a1 - 1) >> 1)) >> 2)
| (((a1 - 1) | ((unsigned __int64)(a1 - 1) >> 1) | (((a1 - 1) | ((unsigned __int64)(a1 - 1) >> 1)) >> 2)) >> 4)) >> 8);
return (v1 | (v1 >> 16)) + 1;
}