//
// cocos2d::CCTMXLayer::atlasIndexForNewZ from 0x803c58 to 0x803c76 (30 bytes)
//
// 1 xrefs:
// > cocos2d::CCTMXLayer::insertTileForGID @ 0x8041e4
//
// 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:01:22 +0000
//
int __fastcall cocos2d::CCTMXLayer::atlasIndexForNewZ(cocos2d::CCTMXLayer *this, int a2)
{
_DWORD *v2; // r3
int result; // r0
v2 = *((_DWORD **)this + 89);
for ( result = 0; result != *v2 && *(_DWORD *)(v2[3] + 4 * result) <= a2; ++result )
;
return result;
}