//
// cocos2d::CCLabelBMFont::updateDisplayedOpacity from 0x100398bac to 0x100398c34 (136 bytes)
//
// 3 xrefs:
// > sub_100398C34 @ 0x100398c38
// > ??> @ 0x1008b9150
// > ??> @ 0x100941ff8
//
// 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::updateDisplayedOpacity(__int64 result, int a2)
{
__int64 v2; // x8
unsigned int *v3; // x9
__int64 v4; // x8
__int64 v5; // x19
__int64 *v6; // x20
unsigned __int64 v7; // x21
*(_BYTE *)(result + 480) = (int)((double)((unsigned int)*(unsigned __int8 *)(result + 481) * a2) / 255.0);
v2 = *(_QWORD *)(result + 208);
if ( v2 )
{
v3 = *(unsigned int **)(v2 + 56);
v4 = *v3;
if ( (_DWORD)v4 )
{
v5 = result;
v6 = *((__int64 **)v3 + 2);
v7 = (unsigned __int64)&v6[v4 - 1];
do
{
result = *v6;
if ( !*v6 )
break;
result = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)result + 920LL))(
result,
*(unsigned __int8 *)(v5 + 480));
++v6;
}
while ( (unsigned __int64)v6 <= v7 );
}
}
return result;
}