//
// ScrollableContentLayer::clampOffset from 0x3f48d4 to 0x3f492a (86 bytes)
//
// 5 xrefs:
// > ScrollableContentLayer::setContentHeight @ 0x3f6408
// > ScrollableContentLayer::setViewSize @ 0x3f6438
// > ScrollableContentLayer::scrollTo @ 0x3f645a
// > ScrollableContentLayer::handleTouchMoved @ 0x3f658a
// > ScrollableContentLayer::reloadVirtualRows @ 0x3f6a5e
//
// 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:47:16 +0000
//
int __fastcall ScrollableContentLayer::clampOffset(int this)
{
float v1; // s14
float v2; // s13
float v3; // s15
v1 = *(float *)(this + 324);
if ( !*(_BYTE *)(this + 444) )
v1 = *(float *)(this + 328);
v2 = *(float *)(this + 336);
v3 = *(float *)(this + 332) - v1;
if ( v3 < 0.0 )
v3 = 0.0;
if ( v2 >= 0.0 )
{
if ( v2 <= v3 )
return this;
*(float *)(this + 336) = v3;
}
else
{
*(_DWORD *)(this + 336) = 0;
}
*(_DWORD *)(this + 368) = 0;
return this;
}