//
// cocos2d::CCTMXLayer::reusedTileWithRect from 0xb38914 to 0xb389d8 (196 bytes)
//
// 4 xrefs:
// > cocos2d::CCTMXLayer::insertTileForGID @ 0xb39538
// > cocos2d::CCTMXLayer::updateTileForGID @ 0xb396e0
// > cocos2d::CCTMXLayer::appendTileForGID @ 0xb39854
// > ??> @ 0x3c210
//
// 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
//
// local variable allocation has failed, the output may be wrong!
cocos2d::CCSprite *cocos2d::CCTMXLayer::reusedTileWithRect(cocos2d::CCTMXLayer *a1, cocos2d::CCRect a2)
{
const cocos2d::CCRect *v2; // x1
__int64 v4; // x0
const cocos2d::CCRect *v5; // x20
cocos2d::CCSprite *v7; // x21
float v8; // s0
bool (__fastcall *initWithTexture_1)(cocos2d::CCSprite *__hidden, cocos2d::CCTexture2D *, const cocos2d::CCRect *, bool); // x22
__int64 v10; // x0
v4 = *(_QWORD *)&a1[1].m_obPosition.y;
v5 = v2;
if ( v4 )
{
(*(void (__fastcall **)(__int64, _QWORD, long double, long double, long double, long double))(*(_QWORD *)v4 + 1104LL))(
v4,
0,
*(long double *)&a2,
*(long double *)((char *)&a2 + 4),
*(long double *)&a2.size.width,
*(long double *)&a2.size.height);
(*(void (__fastcall **)(_QWORD, const cocos2d::CCRect *, _QWORD, cocos2d::CCSize *))(**(_QWORD **)&a1[1].m_obPosition.y
+ 1128LL))(
*(_QWORD *)&a1[1].m_obPosition.y,
v5,
0,
&v5->size);
}
else
{
v7 = (cocos2d::CCSprite *)operator new(0x258u);
v8 = cocos2d::CCSprite::CCSprite(v7);
*(_QWORD *)&a1[1].m_obPosition.y = v7;
initWithTexture_1 = v7->initWithTexture_1;
v10 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *, float))a1->m_pobTextureAtlas->getTexture)(
a1->m_pobTextureAtlas,
v8);
initWithTexture_1(v7, (cocos2d::CCTexture2D *)v10, v5, 0);
}
(*(void (__fastcall **)(_QWORD, cocos2d::CCTMXLayer *))(**(_QWORD **)&a1[1].m_obPosition.y + 1104LL))(
*(_QWORD *)&a1[1].m_obPosition.y,
a1);
return *(cocos2d::CCSprite **)&a1[1].m_obPosition.y;
}