//
// CCScrollLayerExt::doConstraintContent from 0x695408 to 0x69558c (388 bytes)
//
// 4 xrefs:
// > CCScrollLayerExt::constraintContent @ 0x695594
// > MPLobbyLayer::updateComments @ 0xb055d0
// > SFXBrowser::restoreListScroll @ 0xb8e2f0
// > ??> @ 0x94a20
//
// 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:50:37 +0000
//
__int64 __fastcall CCScrollLayerExt::doConstraintContent(CCScrollLayerExt *this, unsigned __int8 a2)
{
int v2; // w21
float v4; // s11
float v5; // s9
float MinY; // s10
float MaxY; // s8
__int64 v8; // x0
void (__fastcall ***v10)(_QWORD, CCScrollLayerExt *); // x0
const cocos2d::CCPoint *v11; // x1
cocos2d::CCEaseInOut *v12; // x0
cocos2d::CCActionInterval *v13; // x1
cocos2d::CCSequence *v14; // x21
cocos2d::CCFiniteTimeAction *v15; // x0
cocos2d::CCNode *v16; // x19
cocos2d::CCAction *v17; // x0
_BYTE v18[8]; // [xsp+50h] [xbp+50h] BYREF
v2 = a2;
v4 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 61) + 192LL))(*((_QWORD *)this + 61));
v5 = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 61) + 192LL))(*((_QWORD *)this + 61)) + 4);
MinY = CCScrollLayerExt::getMinY(this);
MaxY = CCScrollLayerExt::getMaxY(this);
if ( v5 <= MaxY )
{
if ( v5 >= MinY )
{
v8 = *((_QWORD *)this + 60);
if ( v8 )
(*(void (__fastcall **)(__int64, CCScrollLayerExt *))(*(_QWORD *)v8 + 24LL))(v8, this);
return _stack_chk_guard;
}
MaxY = MinY;
}
cocos2d::CCNode::stopAllActions(*((cocos2d::CCNode **)this + 61));
if ( v2 )
{
(*(void (__fastcall **)(_QWORD, float, float))(**((_QWORD **)this + 61) + 200LL))(*((_QWORD *)this + 61), v4, MaxY);
CCScrollLayerExt::scrollingEnd((cocos2d::CCNode **)this);
}
else
{
v10 = *((void (__fastcall ****)(_QWORD, CCScrollLayerExt *))this + 60);
if ( v10 )
(**v10)(v10, this);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, v4, MaxY);
v12 = (cocos2d::CCEaseInOut *)cocos2d::CCMoveTo::create((cocos2d::CCMoveTo *)v18, 0.3, v11);
v14 = (cocos2d::CCSequence *)cocos2d::CCEaseInOut::create(v12, v13, 2.0);
v15 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, CCScrollLayerExt::scrollingEnd, 0);
v16 = *((cocos2d::CCNode **)this + 61);
v17 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v14, v15, 0);
cocos2d::CCNode::runAction(v16, v17);
}
return _stack_chk_guard;
}