//
// cocos2d::CCLabelBMFont::updateDisplayedColor from 0x100398c3c to 0x100398d00 (196 bytes)
//
// 3 xrefs:
// > sub_100398D00 @ 0x100398d04
// > ??> @ 0x1008b9180
// > ??> @ 0x100942028
//
// 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 11:03:42 +0000
//
__int64 __fastcall cocos2d::CCLabelBMFont::updateDisplayedColor(__int64 result, unsigned __int8 *a2)
{
int v2; // w9
double v3; // d0
__int64 v4; // x8
unsigned int *v5; // x9
__int64 v6; // x8
__int64 v7; // x19
__int64 *v8; // x20
unsigned __int64 v9; // x21
v2 = (int)((double)(a2[1] * (unsigned int)*(unsigned __int8 *)(result + 486)) / 255.0);
*(_BYTE *)(result + 482) = (int)((double)(*a2 * (unsigned int)*(unsigned __int8 *)(result + 485)) / 255.0);
v3 = (double)(a2[2] * (unsigned int)*(unsigned __int8 *)(result + 487));
*(_BYTE *)(result + 483) = v2;
*(_BYTE *)(result + 484) = (int)(v3 / 255.0);
v4 = *(_QWORD *)(result + 208);
if ( v4 )
{
v5 = *(unsigned int **)(v4 + 56);
v6 = *v5;
if ( (_DWORD)v6 )
{
v7 = result;
v8 = *((__int64 **)v5 + 2);
v9 = (unsigned __int64)&v8[v6 - 1];
do
{
result = *v8;
if ( !*v8 )
break;
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)result + 968LL))(result, v7 + 482);
++v8;
}
while ( (unsigned __int64)v8 <= v9 );
}
}
return result;
}