//
// cocos2d::CCTMXLayer::atlasIndexForExistantZ from 0x5f71f8 to 0x5f723e (70 bytes)
//
// 3 xrefs:
// > cocos2d::CCTMXLayer::updateTileForGID @ 0x5f7b34
// > cocos2d::CCTMXLayer::tileAt @ 0x5f7ed2
// > cocos2d::CCTMXLayer::removeTileAt @ 0x5f7f7a
//
// 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
//
unsigned int cocos2d::CCTMXLayer::atlasIndexForExistantZ(cocos2d::CCTMXLayer *a1, unsigned int a2)
{
unsigned int v3; // [sp+8h] [bp-Ch] BYREF
v3 = a2;
return ((unsigned int)bsearch(
&v3,
*(const void **)(LODWORD(a1[1].m_fScaleX) + 12),
*(_DWORD *)LODWORD(a1[1].m_fScaleX),
4u,
(int (*)(const void *, const void *))sub_5F6EF6)
- *(_DWORD *)(LODWORD(a1[1].m_fScaleX) + 12)) >> 2;
}