//
// cocos2d::CCTMXLayer::reusedTileWithRect from 0xdab030 to 0xdab0f4 (196 bytes)
//
// 4 xrefs:
// > cocos2d::CCTMXLayer::insertTileForGID @ 0xdabdc8
// > cocos2d::CCTMXLayer::updateTileForGID @ 0xdabf70
// > cocos2d::CCTMXLayer::appendTileForGID @ 0xdac0e4
// > ??> @ 0x572f8
//
// 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:34 +0000
//
__int64 __fastcall cocos2d::CCTMXLayer::reusedTileWithRect(__int64 a1, __int64 a2)
{
__int64 v4; // x0
cocos2d::CCSprite *v6; // x21
float v7; // s0
void (__fastcall *v8)(cocos2d::CCSprite *, __int64, __int64, _QWORD); // x22
__int64 v9; // x0
v4 = *(_QWORD *)(a1 + 456);
if ( v4 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 1120LL))(v4, 0);
(*(void (__fastcall **)(_QWORD, __int64, _QWORD, __int64))(**(_QWORD **)(a1 + 456) + 1144LL))(
*(_QWORD *)(a1 + 456),
a2,
0,
a2 + 8);
}
else
{
v6 = (cocos2d::CCSprite *)operator new(0x258u);
v7 = cocos2d::CCSprite::CCSprite(v6);
*(_QWORD *)(a1 + 456) = v6;
v8 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64, __int64, _QWORD))(*(_QWORD *)v6 + 1024LL);
v9 = (*(__int64 (__fastcall **)(_QWORD, float))(**(_QWORD **)(a1 + 328) + 96LL))(*(_QWORD *)(a1 + 328), v7);
v8(v6, v9, a2, 0);
}
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 456) + 1120LL))(*(_QWORD *)(a1 + 456), a1);
return *(_QWORD *)(a1 + 456);
}