//
// cocos2d::ccNextPOT from 0xd9141c to 0xd9143c (32 bytes)
//
// 12 xrefs:
// > cocos2d::CCGridBase::initWithSize @ 0xd4ecec
// > cocos2d::CCGridBase::initWithSize @ 0xd4ed00
// > cocos2d::CCRenderTexture::initWithWidthAndHeight @ 0xd6aad4
// > cocos2d::CCRenderTexture::initWithWidthAndHeight @ 0xd6aae0
// > cocos2d::CCTexture2D::generateMipmap @ 0xda2984
// > cocos2d::CCTexture2D::generateMipmap @ 0xda29b8
// > cocos2d::CCTexture2D::setTexParameters @ 0xda29e8
// > cocos2d::CCTexture2D::setTexParameters @ 0xda2a68
// > cocos2d::CCTexturePVR::unpackPVRv2Data @ 0xda9ca8
// > cocos2d::CCTexturePVR::unpackPVRv2Data @ 0xda9cbc
// > cocos2d::CCTexturePVR::createGLTexture @ 0xdaa268
// > ??> @ 0x6b9b0
//
// 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:08:19 +0000
//
unsigned __int64 __fastcall cocos2d::ccNextPOT(cocos2d *this)
{
unsigned __int64 v1; // x0
unsigned __int64 v2; // x0
v1 = ((unsigned __int64)this - 1)
| (((unsigned __int64)this - 1) >> 1)
| ((((unsigned __int64)this - 1) | (((unsigned __int64)this - 1) >> 1)) >> 2);
v2 = v1 | (v1 >> 4) | ((v1 | (v1 >> 4)) >> 8);
return (v2 | (v2 >> 16)) + 1;
}