//
// cocos2d::extension::CCScrollView::setContentOffset from 0xaa564c to 0xaa579c (336 bytes)
//
// 6 xrefs:
// > cocos2d::extension::CCScrollView::setZoomScale @ 0xaa5930
// > cocos2d::extension::CCScrollView::relocateContainer @ 0xaa5b98
// > cocos2d::extension::CCScrollView::deaccelerateScrolling @ 0xaa5da8
// > cocos2d::extension::CCScrollView::ccTouchMoved @ 0xaa69e8
// > cocos2d::extension::CCTableView::_updateContentSize @ 0xaa774c
// > ??> @ 0x85458
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void cocos2d::extension::CCScrollView::setContentOffset(
cocos2d::extension::CCScrollView *a1,
cocos2d::CCPoint a2,
bool a3)
{
char v3; // w2
float *v5; // x21
cocos2d::extension::CCScrollViewDelegate *m_pDelegate; // x0
float y; // s2
float v8; // s2
float v9; // [xsp+38h] [xbp+38h]
float v10; // [xsp+3Ch] [xbp+3Ch]
cocos2d::CCPoint v11; // [xsp+40h] [xbp+40h] BYREF
cocos2d::CCPoint v12; // 0:s0.4,4:s1.4
v5 = (float *)a3;
if ( v3 )
{
cocos2d::CCPoint::CCPoint(&v11, (const cocos2d::CCPoint *)a3);
v12.x = 0.15;
cocos2d::extension::CCScrollView::setContentOffsetInDuration(a1, v12, v8);
return;
}
if ( !a1->m_bBounceable )
{
cocos2d::extension::CCScrollView::minContainerOffset(a1);
cocos2d::extension::CCScrollView::maxContainerOffset(a1);
a2.x = v9;
if ( v11.x <= *v5 )
{
if ( v11.x <= v9 )
goto LABEL_10;
}
else if ( *v5 <= v9 )
{
goto LABEL_10;
}
a2.x = *v5;
if ( v11.x <= *v5 )
a2.x = v11.x;
LABEL_10:
a2.y = v5[1];
y = v11.y;
*v5 = a2.x;
a2.x = v10;
if ( y <= a2.y )
{
if ( y > v10 )
{
LABEL_12:
a2.x = a2.y;
if ( y <= a2.y )
a2.x = y;
}
}
else if ( a2.y > v10 )
{
goto LABEL_12;
}
v5[1] = a2.x;
}
((void (__fastcall *)(cocos2d::CCNode *, float *, long double, long double))a1->m_pContainer->setPosition)(
a1->m_pContainer,
v5,
*(long double *)&a2.x,
*(long double *)&a2.y);
m_pDelegate = a1->m_pDelegate;
if ( m_pDelegate )
m_pDelegate->scrollViewDidScroll(m_pDelegate, a1);
}