//
// sub_18009E360 from 0x18009e360 to 0x18009e399 (57 bytes)
//
// 2 xrefs:
// > cocos2d::CCTMXLayer::removeChild @ 0x1800acb75
// > cocos2d::CCTMXLayer::removeTileAt @ 0x1800acc40
//
// 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_18009E360(__int64 a1, __int64 a2)
{
unsigned int v2; // r11d
__int64 result; // rax
__int64 v4; // r9
v2 = --*(_DWORD *)a1;
if ( (unsigned int)a2 < *(_DWORD *)a1 )
{
result = (unsigned int)a2;
v4 = 8LL * (unsigned int)a2;
do
{
v4 += 8;
a2 = (unsigned int)(a2 + 1);
*(_QWORD *)(v4 + *(_QWORD *)(a1 + 16) - 8) = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * a2);
}
while ( (unsigned int)a2 < v2 );
}
return result;
}