//
// cocos2d::CCTileMapAtlas::updateAtlasValues from 0xdb0fcc to 0xdb11a4 (472 bytes)
//
// 2 xrefs:
// > ??> @ 0x6faa8
// > ??> @ 0x1531870
//
// 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:39 +0000
//
__int64 __fastcall cocos2d::CCTileMapAtlas::updateAtlasValues(cocos2d::CCTileMapAtlas *this)
{
int v2; // w27
__int64 v3; // x1
signed int v4; // w25
int i; // w19
__int64 v6; // x3
cocos2d::CCObject *v7; // x22
cocos2d::CCObject *v8; // x28
__int64 v9; // x23
char *CString; // x0
size_t v11; // x0
char *v13; // [xsp+68h] [xbp+68h]
__int16 v14; // [xsp+70h] [xbp+70h] BYREF
char v15; // [xsp+72h] [xbp+72h]
float v16; // [xsp+78h] [xbp+78h] BYREF
__int64 v17[2]; // [xsp+80h] [xbp+80h] BYREF
void *v18; // [xsp+90h] [xbp+90h]
v2 = 0;
v3 = *((_QWORD *)this + 51);
v4 = 0;
if ( *(__int16 *)(v3 + 6) > 0 )
{
do
{
for ( i = 0; *(__int16 *)(v3 + 8) > i; ++v4 )
{
while ( 1 )
{
if ( *((_DWORD *)this + 106) > v4 )
{
v6 = *(_QWORD *)(v3 + 16) + 3LL * (v2 + *(__int16 *)(v3 + 6) * i);
v14 = *(_WORD *)v6;
v15 = *(_BYTE *)(v6 + 2);
if ( (_BYTE)v14 )
break;
}
if ( *(__int16 *)(v3 + 8) <= ++i )
goto LABEL_10;
}
cocos2d::CCPoint::CCPoint(&v16, (float)v2, (float)i);
cocos2d::CCTileMapAtlas::updateAtlasValueAt((__int64)this, &v16, (unsigned __int8 *)&v14, v4);
v7 = cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%d,%d", (unsigned int)v2, (unsigned int)i);
v8 = (cocos2d::CCObject *)operator new(0x40u);
cocos2d::CCObject::CCObject((__int64)v8);
*((_DWORD *)v8 + 14) = v4;
*(_QWORD *)v8 = &off_1428350;
cocos2d::CCObject::autorelease(v8);
v9 = *((_QWORD *)this + 52);
CString = cocos2d::CCString::getCString(v7);
v17[0] = 0;
v13 = CString;
v17[1] = 0;
v18 = nullptr;
v11 = strlen(CString);
std::string::__init(v17, v13, v11);
cocos2d::CCDictionary::setObject(v9, v8, (__int64)v17);
if ( (v17[0] & 1) != 0 )
operator delete(v18);
v3 = *((_QWORD *)this + 51);
++i;
}
LABEL_10:
++v2;
}
while ( *(__int16 *)(v3 + 6) > v2 );
}
return _stack_chk_guard;
}