//
// CCScrollLayerExt::updateScrollDecay from 0x3c8a48 to 0x3c8b46 (254 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 11:46:36 +0000
//
int __fastcall CCScrollLayerExt::updateScrollDecay(CCScrollLayerExt *this, float a2)
{
float v3; // s14
float v4; // s16
float v5; // s14
float v6; // s13
int v7; // r0
int v8; // r9
float MinY; // s16
float v10; // r0
int result; // r0
_BYTE v12[4]; // [sp+4h] [bp-18h] BYREF
float v13; // [sp+8h] [bp-14h]
_DWORD v14[2]; // [sp+Ch] [bp-10h] BYREF
v3 = *((float *)this + 98);
v4 = (float)(v3 * a2) * 15.0;
v5 = v3 - v4;
v6 = fabsf(v5);
if ( v6 < 0.1 )
*((_DWORD *)this + 98) = 0;
else
*((float *)this + 98) = v5;
v7 = *((_DWORD *)this + 91);
if ( v6 < 0.1 )
v4 = v4 + v5;
v8 = (*(int (__fastcall **)(int))(*(_DWORD *)v7 + 96))(v7);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14, 0.0, v4);
cocos2d::CCPoint::operator+(v12, v8, v14);
MinY = CCScrollLayerExt::getMinY(this);
v10 = COERCE_FLOAT(CCScrollLayerExt::getMaxY(this));
if ( v13 >= MinY )
{
if ( v13 <= v10 )
goto LABEL_11;
v13 = v10;
}
else
{
v13 = MinY;
}
*((_DWORD *)this + 98) = 0;
LABEL_11:
result = (*(int (__fastcall **)(_DWORD, _BYTE *))(**((_DWORD **)this + 91) + 92))(*((_DWORD *)this + 91), v12);
if ( *((float *)this + 98) == 0.0 )
{
v14[1] = 0;
v14[0] = CCScrollLayerExt::updateScrollDecay;
result = cocos2d::CCNode::unschedule(this, CCScrollLayerExt::updateScrollDecay, 0);
*((_BYTE *)this + 396) = 0;
}
return result;
}