//
// cocos2d::extension::CCScrollView::setContentOffset from 0xd17090 to 0xd171e0 (336 bytes)
//
// 6 xrefs:
// > cocos2d::extension::CCScrollView::setZoomScale @ 0xd17374
// > cocos2d::extension::CCScrollView::relocateContainer @ 0xd175dc
// > cocos2d::extension::CCScrollView::deaccelerateScrolling @ 0xd177ec
// > cocos2d::extension::CCScrollView::ccTouchMoved @ 0xd1842c
// > cocos2d::extension::CCTableView::_updateContentSize @ 0xd1910c
// > ??> @ 0xb0f98
//
// 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::setContentOffset(__int64 a1, float *a2, char a3)
{
__int64 v5; // x0
float v7; // s0
float v8; // s1
float v9; // s2
float v10; // s0
float v11; // [xsp+38h] [xbp+38h] BYREF
float v12; // [xsp+3Ch] [xbp+3Ch]
float v13[2]; // [xsp+40h] [xbp+40h] BYREF
if ( a3 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v13, (const cocos2d::CCPoint *)a2);
cocos2d::extension::CCScrollView::setContentOffsetInDuration(a1, (cocos2d::CCMoveTo *)v13, 0.15);
return _stack_chk_guard;
}
if ( !*(_BYTE *)(a1 + 468) )
{
cocos2d::extension::CCScrollView::minContainerOffset(
(cocos2d::extension::CCScrollView *)a1,
(cocos2d::CCPoint *)&v11);
cocos2d::extension::CCScrollView::maxContainerOffset((cocos2d::CCPoint *)v13);
v7 = v11;
if ( v13[0] <= *a2 )
{
if ( v13[0] <= v11 )
goto LABEL_10;
}
else if ( *a2 <= v11 )
{
goto LABEL_10;
}
v7 = *a2;
if ( v13[0] <= *a2 )
v7 = v13[0];
LABEL_10:
v8 = a2[1];
v9 = v13[1];
*a2 = v7;
v10 = v12;
if ( v9 <= v8 )
{
if ( v9 > v12 )
{
LABEL_12:
v10 = v8;
if ( v9 <= v8 )
v10 = v9;
}
}
else if ( v8 > v12 )
{
goto LABEL_12;
}
a2[1] = v10;
}
(*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(a1 + 440) + 184LL))(*(_QWORD *)(a1 + 440), a2);
v5 = *(_QWORD *)(a1 + 416);
if ( v5 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 16LL))(v5, a1);
return _stack_chk_guard;
}