//
// cocos2d::CCTMXLayer::updateTileForGID from 0xdabec8 to 0xdac004 (316 bytes)
//
// 2 xrefs:
// > cocos2d::CCTMXLayer::setTileGID @ 0xdac860
// > ??> @ 0xe2258
//
// This function is hookable on this platform (idp: arm, 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 13:08:35 +0000
//
__int64 __fastcall cocos2d::CCTMXLayer::updateTileForGID(
cocos2d::CCTMXTilesetInfo **this,
unsigned int a2,
const cocos2d::CCPoint *a3)
{
int v6; // w22
__int64 v7; // x20
__int64 v9; // [xsp+58h] [xbp+58h] BYREF
float v10; // [xsp+60h] [xbp+60h]
float v11; // [xsp+64h] [xbp+64h]
float v12[4]; // [xsp+68h] [xbp+68h] BYREF
cocos2d::CCTMXTilesetInfo::rectForGID(&v9, *(this + 48), a2);
cocos2d::CCRect::CCRect(
(cocos2d::CCRect *)v12,
*(float *)&v9 / *((float *)this + 118),
*((float *)&v9 + 1) / *((float *)this + 118),
v10 / *((float *)this + 118),
v11 / *((float *)this + 118));
cocos2d::CCRect::operator=((float *)&v9, v12);
v6 = (int)(float)(*(float *)a3 + (float)(*((float *)a3 + 1) * *((float *)this + 89)));
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v12, (const cocos2d::CCRect *)&v9);
v7 = cocos2d::CCTMXLayer::reusedTileWithRect((__int64)this, (__int64)v12);
cocos2d::CCPoint::CCPoint(v12, a3);
cocos2d::CCTMXLayer::setupTileSprite((unsigned __int8 *)this, (__int64 *)v7, (const cocos2d::CCPoint *)v12, a2);
*(_DWORD *)(v7 + 360) = cocos2d::CCTMXLayer::atlasIndexForExistantZ((cocos2d::CCTMXLayer *)this, v6);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 1200LL))(v7, 1);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 792LL))(v7);
*((_DWORD *)*(this + 47) + v6) = a2;
return v7;
}