//
// cocos2d::extension::CCScrollView::relocateContainer from 0xaa5a44 to 0xaa5bd0 (396 bytes)
//
// 2 xrefs:
// > cocos2d::extension::CCScrollView::deaccelerateScrolling @ 0xaa5df4
// > ??> @ 0x5dab0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void cocos2d::extension::CCScrollView::relocateContainer(cocos2d::extension::CCScrollView *a1, bool a2)
{
float v3; // s0
float v4; // s1
cocos2d::CCScrollViewDirection m_eDirection; // w0
float x; // s0
float v7; // s1
float y; // s1
cocos2d::CCPoint v9; // [xsp+58h] [xbp+58h] BYREF
cocos2d::CCPoint v10; // [xsp+60h] [xbp+60h] BYREF
cocos2d::CCPoint v11; // [xsp+68h] [xbp+68h] BYREF
cocos2d::CCPoint v12; // [xsp+70h] [xbp+70h] BYREF
cocos2d::CCPoint v13; // 0:kr00_8.8
cocos2d::CCPoint v14; // 0:kr08_8.8
cocos2d::CCPoint v15; // 0:s0.4,4:s1.4
cocos2d::CCPoint::CCPoint(&v9);
cocos2d::CCPoint::CCPoint(&v10);
cocos2d::CCPoint::CCPoint(&v11);
v13 = cocos2d::extension::CCScrollView::minContainerOffset(a1);
cocos2d::CCPoint::operator=(&v10, v13.x, v13.y);
v14 = cocos2d::extension::CCScrollView::maxContainerOffset(a1);
cocos2d::CCPoint::operator=(&v11, v14.x, v14.y);
v3 = ((float (__fastcall *)(cocos2d::CCNode *))a1->m_pContainer->getPosition)(a1->m_pContainer);
cocos2d::CCPoint::operator=(&v9, v3, v4);
m_eDirection = a1->m_eDirection;
x = v9.x;
if ( (m_eDirection & 0xFFFFFFFD) == 0 )
{
v7 = v10.x;
if ( v9.x < v10.x )
{
x = v11.x;
if ( v10.x > v11.x )
goto LABEL_4;
goto LABEL_12;
}
v7 = v9.x;
x = v11.x;
if ( v9.x <= v11.x )
LABEL_12:
x = v7;
}
LABEL_4:
y = v9.y;
if ( (unsigned int)(m_eDirection - 1) <= 1 )
{
y = v10.y;
if ( v9.y <= v11.y )
{
if ( v9.y >= v10.y )
{
y = v9.y;
goto LABEL_5;
}
}
else
{
if ( v11.y < v10.y )
goto LABEL_5;
y = v11.y;
}
LABEL_11:
cocos2d::CCPoint::CCPoint(&v12, x, y);
cocos2d::extension::CCScrollView::setContentOffset(a1, v15, (bool)&v12);
return;
}
LABEL_5:
if ( y != v9.y || x != v9.x )
goto LABEL_11;
}