//
// ScrollableContentLayer::update from 0x6e5eec to 0x6e60d8 (492 bytes)
//
// 2 xrefs:
// > ??> @ 0x91750
// > ??> @ 0x1424bf8
//
// 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 12:51:43 +0000
//
__int64 __fastcall ScrollableContentLayer::update(ScrollableContentLayer *this, float a2)
{
float v4; // s0
float v5; // s9
float v6; // s0
float v7; // s8
float v8; // s10
float v9; // s8
__int64 result; // x0
float v11; // s0
float v12; // s8
float v13; // s0
float v14; // s0
float v15; // s0
v4 = *((float *)this + 106);
if ( !*((_BYTE *)this + 584) )
v4 = *((float *)this + 107);
v5 = *((float *)this + 108) - v4;
if ( v5 < 0.0 )
v5 = 0.0;
v6 = *((float *)this + 119);
if ( v6 == 0.0 )
{
v7 = *((float *)this + 109);
goto LABEL_7;
}
v12 = (float)(v6 * a2) * 15.0;
v13 = v6 - v12;
if ( fabsf(v13) < 0.1 )
{
v12 = v12 + v13;
v13 = 0.0;
}
*((float *)this + 119) = v13;
v8 = 0.0;
v7 = v12 + *((float *)this + 109);
if ( v7 >= 0.0 )
{
if ( v5 < v7 )
{
*((float *)this + 109) = v5;
*((_DWORD *)this + 119) = 0;
v7 = v5;
if ( v5 >= 0.0 )
goto LABEL_23;
goto LABEL_11;
}
*((float *)this + 109) = v7;
LABEL_7:
if ( v7 >= 0.0 )
goto LABEL_8;
v8 = 0.0;
LABEL_11:
v9 = *((float *)this + 109) + (float)((float)(v8 - v7) * (float)(1.0 - expf(a2 * -12.0)));
*((_DWORD *)this + 118) = 0;
*((float *)this + 109) = v9;
if ( vabds_f32(v9, v8) < 0.5 )
*((float *)this + 109) = v8;
LABEL_13:
result = ScrollableContentLayer::applyContentPosition(this);
v11 = *((float *)this + 109);
if ( v11 < 0.0 )
return result;
goto LABEL_14;
}
*((_DWORD *)this + 109) = 0;
*((_DWORD *)this + 119) = 0;
v7 = 0.0;
LABEL_8:
if ( v5 < v7 )
{
v8 = 0.0;
if ( v7 >= 0.0 )
v8 = v5;
goto LABEL_11;
}
LABEL_23:
v14 = *((float *)this + 118);
if ( v14 == 0.0 )
goto LABEL_13;
*((float *)this + 109) = v7 + (float)(a2 * v14);
v15 = powf(0.95, a2 * 60.0) * *((float *)this + 118);
if ( fabsf(v15) < 2.0 )
v15 = 0.0;
*((float *)this + 118) = v15;
result = ScrollableContentLayer::applyContentPosition(this);
v11 = *((float *)this + 109);
if ( v11 >= 0.0 )
{
LABEL_14:
if ( *((float *)this + 119) == 0.0 && v5 >= v11 && *((float *)this + 118) == 0.0 )
return cocos2d::CCNode::unscheduleUpdate(this);
}
return result;
}