//
// CCCounterLabel::setTargetCount from 0x10003e55c to 0x10003e5cc (112 bytes)
//
// 2 xrefs:
// > sub_1001CA90C @ 0x1001ca93c
// > GJShopLayer::didPurchaseItem @ 0x1001cadd0
//
// 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 10:57:35 +0000
//
__int64 __fastcall CCCounterLabel::setTargetCount(__int64 result, int a2)
{
int v2; // w8
float v3; // s1
float v4; // s2
v2 = *(_DWORD *)(result + 532);
v3 = (float)*(int *)(result + 524);
v4 = vabds_f32((float)a2, v3);
*(_DWORD *)(result + 520) = a2;
if ( v4 < (float)v2 )
v2 = (int)v4;
*(_DWORD *)(result + 516) = (int)(float)((float)((float)a2 - v3) / (float)v2);
if ( (*(_BYTE *)(result + 528) & 1) == 0 )
{
*(_BYTE *)(result + 528) = 1;
if ( (*(_BYTE *)(result + 536) & 1) == 0 )
return cocos2d::CCNode::schedule(result, sub_10003E4E8, 0, 0.033333);
}
return result;
}