//
// cocos2d::CCTileMapAtlas::calculateItemsToRender from 0x1800ae8a0 to 0x1800ae935 (149 bytes)
//
// 3 xrefs:
// > cocos2d::CCTileMapAtlas::initWithTileFile @ 0x1800aea73
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c22f8
//
// This function is hookable on this platform (idp: pc, 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 11:22:18 +0000
//
void __fastcall cocos2d::CCTileMapAtlas::calculateItemsToRender(cocos2d::CCTileMapAtlas *this)
{
__int64 v1; // r9
int v2; // ebx
__int16 v3; // r10
int v4; // eax
__int16 i; // dx
v1 = *((_QWORD *)this + 51);
*((_DWORD *)this + 106) = 0;
v2 = 0;
v3 = *(_WORD *)(v1 + 6);
if ( v3 > 0 )
{
do
{
v4 = 0;
for ( i = v3; v4 < *(__int16 *)(v1 + 8); v3 = i )
{
i = v3;
if ( (unsigned __int8)*(_WORD *)(3LL * (v2 + v4 * v3) + *(_QWORD *)(v1 + 16)) )
{
++*((_DWORD *)this + 106);
i = *(_WORD *)(v1 + 6);
}
++v4;
}
++v2;
v3 = i;
}
while ( v2 < i );
}
}