//
// cocos2d::CCLabelAtlas::updateAtlasValues from 0x7d21c6 to 0x7d23f8 (562 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:35 +0000
//
unsigned int __fastcall cocos2d::CCLabelAtlas::updateAtlasValues(cocos2d::CCLabelAtlas *this)
{
int v2; // r9
char *v3; // r10
int v4; // r9
int v5; // r4
float v6; // s19
cocos2d::CCDirector *v7; // r0
unsigned int v8; // s16
float v9; // s20
cocos2d::CCDirector *v10; // r0
cocos2d::CCDirector *ContentScaleFactor; // r0
unsigned int v12; // s17
float v13; // s18
cocos2d::CCDirector *v14; // r0
float v15; // r0
float v16; // s16
float v17; // s17
unsigned int v18; // r6
unsigned int result; // r0
unsigned int i; // r4
int v21; // r3
unsigned int v22; // r2
float v23; // s18
float v24; // s15
float v25; // s14
float v26; // s21
int v27; // r3
int v28; // r3
unsigned int v29; // s15
unsigned int v30; // s15
char v31; // r6
char v32; // r1
v2 = *((unsigned __int8 *)this + 336);
if ( (v2 & 1) != 0 )
{
v4 = *((_DWORD *)this + 85);
v3 = *((char **)this + 86);
}
else
{
v3 = (char *)this + 337;
v4 = v2 >> 1;
}
v5 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 76) + 48))(*((_DWORD *)this + 76));
v6 = (float)(unsigned int)(*(int (__fastcall **)(int))(*(_DWORD *)v5 + 44))(v5);
v7 = (cocos2d::CCDirector *)(*(int (__fastcall **)(int))(*(_DWORD *)v5 + 48))(v5);
v8 = *((_DWORD *)this + 73);
v9 = (float)(unsigned int)v7;
v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);
ContentScaleFactor = (cocos2d::CCDirector *)cocos2d::CCDirector::getContentScaleFactor(v10);
v12 = *((_DWORD *)this + 74);
v13 = *(float *)&ContentScaleFactor;
v14 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ContentScaleFactor);
v15 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v14));
if ( *((_BYTE *)this + 328) )
{
v16 = (float)*((unsigned int *)this + 73);
v17 = (float)*((unsigned int *)this + 74);
}
else
{
v16 = (float)v8 * v13;
v17 = (float)v12 * v15;
}
v18 = 0;
(*(void (__fastcall **)(_DWORD))(**((_DWORD **)this + 76) + 44))(*((_DWORD *)this + 76));
result = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 76) + 56))(*((_DWORD *)this + 76));
for ( i = result; ; *(_BYTE *)(i - 9) = v28 )
{
i += 96;
if ( v18 == v4 )
break;
v21 = *((_DWORD *)this + 87);
v22 = v18 + 1;
v23 = (float)((float)((unsigned int)(unsigned __int8)(v3[v18] - v21) % *((_DWORD *)this + 71)) * v16) / v6;
v24 = (float)((float)((unsigned int)(unsigned __int8)(v3[v18] - v21) / *((_DWORD *)this + 71)) * v17) / v9;
*(float *)(i - 80) = v23;
*(float *)(i - 56) = v23;
v25 = v24 + (float)(v17 / v9);
*(float *)(i - 76) = v24;
*(float *)(i - 28) = v24;
v26 = v23 + (float)(v16 / v6);
*(float *)(i - 52) = v25;
*(float *)(i - 4) = v25;
*(float *)(i - 32) = v26;
*(float *)(i - 8) = v26;
v27 = *((_DWORD *)this + 73);
*(_DWORD *)(i - 68) = 0;
*(_DWORD *)(i - 64) = 0;
*(float *)(i - 72) = (float)(v27 * v18);
v28 = *((_DWORD *)this + 73);
*(_DWORD *)(i - 20) = 0;
*(_DWORD *)(i - 16) = 0;
*(float *)(i - 24) = (float)(v28 * (v18 + 1));
*(float *)(i - 96) = (float)(*((_DWORD *)this + 73) * v18);
v29 = *((_DWORD *)this + 74);
*(_DWORD *)(i - 88) = 0;
*(float *)(i - 92) = (float)v29;
*(float *)(i - 48) = (float)(*((_DWORD *)this + 73) * (v18 + 1));
v30 = *((_DWORD *)this + 74);
*(_DWORD *)(i - 40) = 0;
*(float *)(i - 44) = (float)v30;
v31 = *((_BYTE *)this + 270);
result = *((unsigned __int8 *)this + 271);
v32 = *((_BYTE *)this + 272);
LOBYTE(v28) = *((_BYTE *)this + 268);
*(_BYTE *)(i - 84) = v31;
*(_BYTE *)(i - 36) = v31;
*(_BYTE *)(i - 60) = v31;
*(_BYTE *)(i - 12) = v31;
v18 = v22;
*(_BYTE *)(i - 83) = result;
*(_BYTE *)(i - 82) = v32;
*(_BYTE *)(i - 81) = v28;
*(_BYTE *)(i - 35) = result;
*(_BYTE *)(i - 34) = v32;
*(_BYTE *)(i - 33) = v28;
*(_BYTE *)(i - 59) = result;
*(_BYTE *)(i - 58) = v32;
*(_BYTE *)(i - 57) = v28;
*(_BYTE *)(i - 11) = result;
*(_BYTE *)(i - 10) = v32;
}
if ( v18 )
{
*(_BYTE *)(*((_DWORD *)this + 76) + 64) = 1;
result = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 76) + 40))(*((_DWORD *)this + 76));
if ( v18 > result )
return cocos2d::CCTextureAtlas::increaseTotalQuadsWith(*((cocos2d::CCTextureAtlas **)this + 76), v18 - result);
}
return result;
}