//
// cocos2d::CCTMXLayer::reusedTileWithRect from 0x100244b90 to 0x100244c35 (165 bytes)
//
// 3 xrefs:
// > cocos2d::CCTMXLayer::appendTileForGID @ 0x100244541
// > cocos2d::CCTMXLayer::insertTileForGID @ 0x1002450d3
// > cocos2d::CCTMXLayer::updateTileForGID @ 0x1002452ac
//
// This function is hookable on this platform (idp: pc, 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 12:27:19 +0000
//
__int64 __fastcall cocos2d::CCTMXLayer::reusedTileWithRect(__int64 a1, __int64 a2)
{
__int64 v3; // rdi
void *v4; // r15
__int64 v5; // rax
v3 = *(_QWORD *)(a1 + 456);
if ( v3 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 1120LL))(v3, 0);
(*(void (__fastcall **)(_QWORD, __int64, _QWORD, __int64))(**(_QWORD **)(a1 + 456) + 1144LL))(
*(_QWORD *)(a1 + 456),
a2,
0,
a2 + 8);
}
else
{
v4 = operator new(0x258u);
sub_100273700(v4);
*(_QWORD *)(a1 + 456) = v4;
v5 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 328) + 96LL))(*(_QWORD *)(a1 + 328));
(*(void (__fastcall **)(void *, __int64, __int64, _QWORD))(*(_QWORD *)v4 + 1024LL))(v4, v5, a2, 0);
}
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 456) + 1120LL))(*(_QWORD *)(a1 + 456), a1);
return *(_QWORD *)(a1 + 456);
}