//
// CCCounterLabel::updateCounter from 0x140046ee0 to 0x140046f5f (127 bytes)
//
// 1 xrefs:
// > CCCounterLabel::setTargetCount @ 0x140046ec2
//
// This function is hookable on this platform (idp: pc, 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:25:31 +0000
//
void __fastcall CCCounterLabel::updateCounter(__int64 a1)
{
int v1; // eax
int v2; // edx
float v3; // xmm2_4
bool v4; // zf
if ( *(_BYTE *)(a1 + 548) )
{
v1 = *(_DWORD *)(a1 + 540);
v2 = *(_DWORD *)(a1 + 544);
if ( v2 < v1 )
{
v3 = fminf((float)(v1 - v2), (float)*(int *)(a1 + 536));
LABEL_6:
*(_DWORD *)(a1 + 544) = (int)(float)(v3 + (float)v2);
CCCounterLabel::updateString();
return;
}
if ( v2 > v1 )
{
v3 = fmaxf((float)(v1 - v2), (float)*(int *)(a1 + 536));
goto LABEL_6;
}
v4 = *(_BYTE *)(a1 + 556) == 0;
*(_BYTE *)(a1 + 548) = 0;
if ( v4 )
cocos2d::CCNode::unscheduleAllSelectors((cocos2d::CCNode *)a1);
}
}