//
// cocos2d::CCTMXLayer::atlasIndexForExistantZ from 0xb38a10 to 0xb38a84 (116 bytes)
//
// 4 xrefs:
// > cocos2d::CCTMXLayer::updateTileForGID @ 0xb39710
// > cocos2d::CCTMXLayer::tileAt @ 0xb39c34
// > cocos2d::CCTMXLayer::removeTileAt @ 0xb39d20
// > ??> @ 0xc8e68
//
// 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)
{
const void **v2; // x5
unsigned int v5; // [xsp+24h] [xbp+24h] BYREF
v2 = *(const void ***)&a1[1].m_fSkewY;
v5 = a2;
return ((unsigned __int64)bsearch(
&v5,
v2[2],
*(unsigned int *)v2,
8u,
(int (*)(const void *, const void *))sub_B384B8)
- *(_QWORD *)(*(_QWORD *)&a1[1].m_fSkewY + 16LL)) >> 3;
}