//
// cocos2d::CCAtlasNode::calculateMaxItems from 0x7c3014 to 0x7c3094 (128 bytes)
//
// 1 xrefs:
// > cocos2d::CCAtlasNode::initWithTexture @ 0x7c313e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:00:22 +0000
//
int __fastcall cocos2d::CCAtlasNode::calculateMaxItems(cocos2d::CCAtlasNode *this, float a2, float a3, int a4)
{
int v5; // r0
int result; // r0
cocos2d::CCTexture2D *v7; // r0
int ContentSizeInPixels; // r0
float v9; // [sp+4h] [bp-Ch] BYREF
float v10; // [sp+8h] [bp-8h]
int v11; // [sp+Ch] [bp-4h]
v9 = a2;
v10 = a3;
v11 = a4;
v5 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 76) + 48))(*((_DWORD *)this + 76));
result = (*(int (__fastcall **)(float *, int))(*(_DWORD *)v5 + 72))(&v9, v5);
if ( *((_BYTE *)this + 328) )
{
v7 = (cocos2d::CCTexture2D *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 76) + 48))(*((_DWORD *)this + 76));
ContentSizeInPixels = cocos2d::CCTexture2D::getContentSizeInPixels(v7);
result = cocos2d::CCSize::operator=(&v9, ContentSizeInPixels);
}
*((_DWORD *)this + 72) = (int)(float)(v10 / (float)*((unsigned int *)this + 74));
*((_DWORD *)this + 71) = (int)(float)(v9 / (float)*((unsigned int *)this + 73));
return result;
}