//
// cocos2d::extension::CCScrollView::relocateContainer from 0xd17488 to 0xd17614 (396 bytes)
//
// 2 xrefs:
// > cocos2d::extension::CCScrollView::deaccelerateScrolling @ 0xd17838
// > ??> @ 0x80290
//
// 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 13:07:06 +0000
//
__int64 __fastcall cocos2d::extension::CCScrollView::relocateContainer(cocos2d::extension::CCScrollView *this, char a2)
{
long double v4; // q0
__int64 v5; // x0
int v6; // w0
float v7; // s0
float v8; // s1
float v9; // s1
float v11; // [xsp+58h] [xbp+58h] BYREF
float v12; // [xsp+5Ch] [xbp+5Ch]
float v13; // [xsp+60h] [xbp+60h] BYREF
float v14; // [xsp+64h] [xbp+64h]
float v15; // [xsp+68h] [xbp+68h] BYREF
float v16; // [xsp+6Ch] [xbp+6Ch]
float v17; // [xsp+70h] [xbp+70h] BYREF
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v11);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v13);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15);
cocos2d::extension::CCScrollView::minContainerOffset(this, (cocos2d::CCPoint *)&v17);
cocos2d::CCPoint::operator=(&v13, &v17);
cocos2d::extension::CCScrollView::maxContainerOffset((cocos2d::CCPoint *)&v17);
*(__n128 *)&v4 = cocos2d::CCPoint::operator=(&v15, &v17);
v5 = (*(__int64 (__fastcall **)(_QWORD, long double))(**((_QWORD **)this + 55) + 192LL))(*((_QWORD *)this + 55), v4);
cocos2d::CCPoint::operator=(&v11, v5);
v6 = *((_DWORD *)this + 106);
v7 = v11;
if ( (v6 & 0xFFFFFFFD) == 0 )
{
v8 = v13;
if ( v11 < v13 )
{
v7 = v15;
if ( v13 > v15 )
goto LABEL_4;
goto LABEL_12;
}
v8 = v11;
v7 = v15;
if ( v11 <= v15 )
LABEL_12:
v7 = v8;
}
LABEL_4:
v9 = v12;
if ( (unsigned int)(v6 - 1) <= 1 )
{
v9 = v14;
if ( v12 <= v16 )
{
if ( v12 >= v14 )
{
v9 = v12;
goto LABEL_5;
}
}
else
{
if ( v16 < v14 )
goto LABEL_5;
v9 = v16;
}
LABEL_11:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, v7, v9);
cocos2d::extension::CCScrollView::setContentOffset((__int64)this, &v17, a2);
return _stack_chk_guard;
}
LABEL_5:
if ( v9 != v12 || v7 != v11 )
goto LABEL_11;
return _stack_chk_guard;
}